aboutsummaryrefslogtreecommitdiff
path: root/sim/mips/mips.igen
diff options
context:
space:
mode:
authorThiemo Seufer <ths@networkno.de>2007-02-19 17:31:08 +0000
committerThiemo Seufer <ths@networkno.de>2007-02-19 17:31:08 +0000
commit14fb6c5a50336c2fc6cb6db8057efa613154f4f8 (patch)
tree5360942ff0daa6d184b9cebb474407ae595bd194 /sim/mips/mips.igen
parentb8e558488cb3c85687107ef81b2504fac0c11a6b (diff)
downloadgdb-14fb6c5a50336c2fc6cb6db8057efa613154f4f8.zip
gdb-14fb6c5a50336c2fc6cb6db8057efa613154f4f8.tar.gz
gdb-14fb6c5a50336c2fc6cb6db8057efa613154f4f8.tar.bz2
* cp1.c (value_fpr): Don't inherit existing FPR_STATE for
uninterpreted formats. If fmt is one of the uninterpreted types don't update the FPR_STATE. Handle fmt_uninterpreted_32 like fmt_word, and fmt_uninterpreted_64 like fmt_long. (store_fpr): When writing an invalid odd register, set the matching even register to fmt_unknown, not the following register. * interp.c (sim_open): If STATE_MEM_SIZE isn't set then set it to the the memory window at offset 0 set by --memory-size command line option. (sim_store_register): Handle storing 4 bytes to an 8 byte floating point register. (sim_fetch_register): Likewise for reading 4 bytes from an 8 byte register. (sim_monitor): When returning the memory size to the MIPS application, use the value in STATE_MEM_SIZE, not an arbitrary hardcoded value. (cop_lw): Don' mess around with FPR_STATE, just pass fmt_uninterpreted_32 to StoreFPR. (cop_sw): Similarly. (cop_ld): Pass fmt_uninterpreted_64 not fmt_uninterpreted. (cop_sd): Similarly. * mips.igen (not_word_value): Single version for mips32, mips64 and mips16.
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