diff options
author | Nick Clifton <nickc@redhat.com> | 2016-07-14 10:38:07 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2016-07-14 10:38:07 +0100 |
commit | 7df94786e4723ba93d8982e55fc5e652b4b80142 (patch) | |
tree | a396635bc96e67a428947ebc8a283614797436ad /sim/arm/armemu.c | |
parent | fa1c0170176a5e4820f43824cffe80ffc4e7a717 (diff) | |
download | gdb-7df94786e4723ba93d8982e55fc5e652b4b80142.zip gdb-7df94786e4723ba93d8982e55fc5e652b4b80142.tar.gz gdb-7df94786e4723ba93d8982e55fc5e652b4b80142.tar.bz2 |
Small improvements to the ARM simulator to cope with illegal binaries.
* armemu.c (Multiply64): Only issue error messages about invalid
arguments if debugging is enabled.
* armos.c (ARMul_OSHandleSWI): Ignore invalid flags.
Diffstat (limited to 'sim/arm/armemu.c')
-rw-r--r-- | sim/arm/armemu.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sim/arm/armemu.c b/sim/arm/armemu.c index 5fde3fd..76f398b 100644 --- a/sim/arm/armemu.c +++ b/sim/arm/armemu.c @@ -5950,10 +5950,10 @@ Multiply64 (ARMul_State * state, ARMword instr, int msigned, int scc) ; else #endif - if (nRdHi == nRm || nRdLo == nRm) + /* BAD code can trigger this result. So only complain if debugging. */ + if (state->Debug && (nRdHi == nRm || nRdLo == nRm)) fprintf (stderr, "sim: MULTIPLY64 - INVALID ARGUMENTS: %d %d %d\n", nRdHi, nRdLo, nRm); - if (msigned) { /* Compute sign of result and adjust operands if necessary. */ @@ -5998,7 +5998,7 @@ Multiply64 (ARMul_State * state, ARMword instr, int msigned, int scc) state->Reg[nRdLo] = RdLo; state->Reg[nRdHi] = RdHi; } - else + else if (state->Debug) fprintf (stderr, "sim: MULTIPLY64 - INVALID ARGUMENTS\n"); if (scc) |