From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LJb9p-0000xH-33 for qemu-devel@nongnu.org; Sun, 04 Jan 2009 17:09:17 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LJb9o-0000wx-GW for qemu-devel@nongnu.org; Sun, 04 Jan 2009 17:09:16 -0500 Received: from [199.232.76.173] (port=56545 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LJb9o-0000wr-7e for qemu-devel@nongnu.org; Sun, 04 Jan 2009 17:09:16 -0500 Received: from savannah.gnu.org ([199.232.41.3]:35954 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LJb9m-0000kw-7F for qemu-devel@nongnu.org; Sun, 04 Jan 2009 17:09:16 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1LJb9g-0008Me-MS for qemu-devel@nongnu.org; Sun, 04 Jan 2009 22:09:08 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1LJb9g-0008Lx-Cc for qemu-devel@nongnu.org; Sun, 04 Jan 2009 22:09:08 +0000 MIME-Version: 1.0 Errors-To: aurel32 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Aurelien Jarno Message-Id: Date: Sun, 04 Jan 2009 22:09:08 +0000 Subject: [Qemu-devel] [6166] Add vsl{b,h,w} instructions. Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 6166 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6166 Author: aurel32 Date: 2009-01-04 22:09:08 +0000 (Sun, 04 Jan 2009) Log Message: ----------- Add vsl{b,h,w} instructions. Signed-off-by: Nathan Froyd Signed-off-by: Aurelien Jarno Modified Paths: -------------- trunk/target-ppc/helper.h trunk/target-ppc/op_helper.c trunk/target-ppc/translate.c Modified: trunk/target-ppc/helper.h =================================================================== --- trunk/target-ppc/helper.h 2009-01-04 22:08:58 UTC (rev 6165) +++ trunk/target-ppc/helper.h 2009-01-04 22:09:08 UTC (rev 6166) @@ -143,6 +143,9 @@ DEF_HELPER_3(vsrb, void, avr, avr, avr) DEF_HELPER_3(vsrh, void, avr, avr, avr) DEF_HELPER_3(vsrw, void, avr, avr, avr) +DEF_HELPER_3(vslb, void, avr, avr, avr) +DEF_HELPER_3(vslh, void, avr, avr, avr) +DEF_HELPER_3(vslw, void, avr, avr, avr) DEF_HELPER_1(efscfsi, i32, i32) DEF_HELPER_1(efscfui, i32, i32) Modified: trunk/target-ppc/op_helper.c =================================================================== --- trunk/target-ppc/op_helper.c 2009-01-04 22:08:58 UTC (rev 6165) +++ trunk/target-ppc/op_helper.c 2009-01-04 22:09:08 UTC (rev 6166) @@ -2088,6 +2088,21 @@ #undef VMUL_DO #undef VMUL +#define VSL(suffix, element) \ + void helper_vsl##suffix (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) \ + { \ + int i; \ + for (i = 0; i < ARRAY_SIZE(r->element); i++) { \ + unsigned int mask = ((1 << (3 + (sizeof (a->element[0]) >> 1))) - 1); \ + unsigned int shift = b->element[i] & mask; \ + r->element[i] = a->element[i] << shift; \ + } \ + } +VSL(b, u8) +VSL(h, u16) +VSL(w, u32) +#undef VSL + #define VSR(suffix, element) \ void helper_vsr##suffix (ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) \ { \ Modified: trunk/target-ppc/translate.c =================================================================== --- trunk/target-ppc/translate.c 2009-01-04 22:08:58 UTC (rev 6165) +++ trunk/target-ppc/translate.c 2009-01-04 22:09:08 UTC (rev 6166) @@ -6219,6 +6219,9 @@ GEN_VXFORM(vmuleuh, 4, 9); GEN_VXFORM(vmulesb, 4, 12); GEN_VXFORM(vmulesh, 4, 13); +GEN_VXFORM(vslb, 2, 4); +GEN_VXFORM(vslh, 2, 5); +GEN_VXFORM(vslw, 2, 6); GEN_VXFORM(vsrb, 2, 8); GEN_VXFORM(vsrh, 2, 9); GEN_VXFORM(vsrw, 2, 10);