[5679] target-mips: convert bit shuffle ops to TCG
Revision: 5679
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5679 Author: aurel32 Date: 2008-11-11 11:47:06 +0000 (Tue, 11 Nov 2008)
Log Message:
-----------
target-mips: convert bit shuffle ops to TCG
Bit shuffle operations can be written with very few TCG instructions (between 5 and 8), so it is worth converting them to TCG.
This code also move all bit shuffle generation code to a separate function in order to have a cleaner exception code path, that is it doesn't store back the TCG register to the target register after the exception, as the TCG register doesn't exist anymore.
Modified Paths:
--------------
trunk/target-mips/helper.h
trunk/target-mips/op_helper.c
trunk/target-mips/translate.c
Modified: trunk/target-mips/helper.h
===================================================================
target-mips/helper.h +0 -7
@@ -269,10 +269,3 @@ DEF_HELPER(target_ulong, do_rdhwr_ccres, (void)) DEF_HELPER(void, do_pmon, (int function)) DEF_HELPER(void, do_wait, (void)) - -/* Bit shuffle operations. */ -DEF_HELPER(target_ulong, do_wsbh, (target_ulong t1)) -#ifdef TARGET_MIPS64 -DEF_HELPER(target_ulong, do_dsbh, (target_ulong t1)) -DEF_HELPER(target_ulong, do_dshd, (target_ulong t1)) -#endif
Modified: trunk/target-mips/op_helper.c
===================================================================
target-mips/op_helper.c +0 -19
@@ -1781,25 +1781,6 @@return 0 ; } -/* Bit shuffle operations. */ -target_ulong do_wsbh (target_ulong t1) -{ -return (int32_t )(((t1 <<8 ) & ~0x00FF00FF ) | ((t1 >>8 ) &0x00FF00FF )); -} - -#if defined(TARGET_MIPS64 ) -target_ulong do_dsbh (target_ulong t1) -{ -return ((t1 <<8 ) & ~0x00FF00FF00FF00FFULL ) | ((t1 >>8 ) &0x00FF00FF00FF00FFULL ); -} - -target_ulong do_dshd (target_ulong t1) -{ - t1 = ((t1 <<16 ) & ~0x0000FFFF0000FFFFULL ) | ((t1 >>16 ) &0x0000FFFF0000FFFFULL ); -return (t1 <<32 ) | (t1 >>32 ); -} -#endif -void do_pmon (int function) { function /=2 ;
Modified: trunk/target-mips/translate.c
===================================================================
target-mips/translate.c +56 -50
124 lines not on this page · raw message