+2016-07-14 Nick Clifton <nickc@redhat.com>
+
+ * armemu.c (Multiply64): Only issue error messages about invalid
+ arguments if debugging is enabled.
+ * armos.c (ARMul_OSHandleSWI): Ignore invalid flags.
+
2016-01-10 Mike Frysinger <vapier@gentoo.org>
* config.in, configure: Regenerate.
;
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. */
state->Reg[nRdLo] = RdLo;
state->Reg[nRdHi] = RdHi;
}
- else
+ else if (state->Debug)
fprintf (stderr, "sim: MULTIPLY64 - INVALID ARGUMENTS\n");
if (scc)
return;
/* Now we need to decode the Demon open mode. */
- flags = translate_open_mode[SWIflags];
+ if (SWIflags >= sizeof (translate_open_mode) / sizeof (translate_open_mode[0]))
+ flags = 0;
+ else
+ flags = translate_open_mode[SWIflags];
/* Filename ":tt" is special: it denotes stdin/out. */
if (strcmp (buf, ":tt") == 0)