aboutsummaryrefslogtreecommitdiff
path: root/tcg/mips/tcg-target.h
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2012-09-21 18:20:26 +0200
committerAurelien Jarno <aurelien@aurel32.net>2012-09-22 15:10:20 +0200
commit7d7c4930ab83349ee31945d93a1747331c37c0eb (patch)
tree9860d1f8919cc881cfc2e86dd3b9f9d3e314bf23 /tcg/mips/tcg-target.h
parent04f71aa3fd002d8c3aeb6db72a9219e1a8b3fef4 (diff)
tcg/mips: implement movcond op on MIPS32R2
movcond operation can be implemented on MIPS32 Release 2 using the MOVN, MOVZ, SLT and SLTU instructions. 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.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/tcg/mips/tcg-target.h b/tcg/mips/tcg-target.h
index 897a737ccc..d147e70eb1 100644
--- a/tcg/mips/tcg-target.h
+++ b/tcg/mips/tcg-target.h
@@ -86,7 +86,15 @@ typedef enum {
#define TCG_TARGET_HAS_orc_i32 0
#define TCG_TARGET_HAS_eqv_i32 0
#define TCG_TARGET_HAS_nand_i32 0
+
+/* optional instructions only implemented on MIPS4, MIPS32 and Loongson 2 */
+#if defined(_MIPS_ARCH_MIPS4) || defined(_MIPS_ARCH_MIPS32) || \
+ defined(_MIPS_ARCH_MIPS32R2) || defined(_MIPS_ARCH_LOONGSON2E) || \
+ defined(_MIPS_ARCH_LOONGSON2F)
+#define TCG_TARGET_HAS_movcond_i32 1
+#else
#define TCG_TARGET_HAS_movcond_i32 0
+#endif
/* optional instructions only implemented on MIPS32R2 */
#ifdef _MIPS_ARCH_MIPS32R2