aboutsummaryrefslogtreecommitdiff
path: root/sim/mips/mips.igen
diff options
context:
space:
mode:
Diffstat (limited to 'sim/mips/mips.igen')
-rw-r--r--sim/mips/mips.igen21
1 files changed, 5 insertions, 16 deletions
diff --git a/sim/mips/mips.igen b/sim/mips/mips.igen
index 85d08ea..6109589 100644
--- a/sim/mips/mips.igen
+++ b/sim/mips/mips.igen
@@ -176,29 +176,18 @@
*vr4100:
*vr5000:
*r3900:
-{
- /* For historical simulator compatibility (until documentation is
- found that makes these operations unpredictable on some of these
- architectures), this check never returns true. */
- return 0;
-}
-
-:function:::int:not_word_value:unsigned_word value
*mips32:
*mips32r2:
-{
- /* On MIPS32, since registers are 32-bits, there's no check to be done. */
- return 0;
-}
-
-:function:::int:not_word_value:unsigned_word value
*mips64:
*mips64r2:
{
- return ((value >> 32) != (value & 0x80000000 ? 0xFFFFFFFF : 0));
+#if WITH_TARGET_WORD_BITSIZE == 64
+ return value != (((value & 0xffffffff) ^ 0x80000000) - 0x80000000);
+#else
+ return 0;
+#endif
}
-
// Helper:
//
// Handle UNPREDICTABLE operation behaviour. The goal here is to prevent