summaryrefslogtreecommitdiffstats
path: root/tcg/mips/tcg-target.h
diff options
context:
space:
mode:
authorAurelien Jarno2012-09-21 18:20:26 +0200
committerAurelien Jarno2012-09-22 15:10:20 +0200
commit9a152519a9f767297c92b5840c91a22235295c8d (patch)
tree51b4843de8404c7180737216b340c1d9a8a1a76a /tcg/mips/tcg-target.h
parenttcg/mips: optimize bswap{16,16s,32} on MIPS32R2 (diff)
downloadqemu-9a152519a9f767297c92b5840c91a22235295c8d.tar.gz
qemu-9a152519a9f767297c92b5840c91a22235295c8d.tar.xz
qemu-9a152519a9f767297c92b5840c91a22235295c8d.zip
tcg/mips: implement rotl/rotr ops on MIPS32R2
rotr operations can be optimized on MIPS32 Release 2 using the ROTR and ROTRV instructions. Also implemented rotl operations by subtracting the shift from 32. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'tcg/mips/tcg-target.h')
-rw-r--r--tcg/mips/tcg-target.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/tcg/mips/tcg-target.h b/tcg/mips/tcg-target.h
index c5c13f71d3..470314cc99 100644
--- a/tcg/mips/tcg-target.h
+++ b/tcg/mips/tcg-target.h
@@ -80,7 +80,6 @@ typedef enum {
#define TCG_TARGET_HAS_div_i32 1
#define TCG_TARGET_HAS_not_i32 1
#define TCG_TARGET_HAS_nor_i32 1
-#define TCG_TARGET_HAS_rot_i32 0
#define TCG_TARGET_HAS_ext8s_i32 1
#define TCG_TARGET_HAS_ext16s_i32 1
#define TCG_TARGET_HAS_andc_i32 0
@@ -94,9 +93,11 @@ typedef enum {
#ifdef _MIPS_ARCH_MIPS32R2
#define TCG_TARGET_HAS_bswap16_i32 1
#define TCG_TARGET_HAS_bswap32_i32 1
+#define TCG_TARGET_HAS_rot_i32 1
#else
#define TCG_TARGET_HAS_bswap16_i32 0
#define TCG_TARGET_HAS_bswap32_i32 0
+#define TCG_TARGET_HAS_rot_i32 0
#endif
/* optional instructions automatically implemented */