[patch] sim: bfin: se_all32bitopcodes: skip debug insns under the sim
Mike Frysinger
vapier@gentoo.org
Mon Jun 24 02:03:00 GMT 2013
Since the sim has a few fake debug insns that the hardware does not, we need
to check for those before attempting to run them. Otherwise we'll randomly
trigger the sim debug asserts/aborts/halts insns. On the hardware, these are
proper invalid insns, and the table catches that.
Committed.
-mike
2013-06-23 Mike Frysinger <vapier@gentoo.org>
* se_all32bitopcodes.S (se_all_next_insn): Skip debug insn opcodes.
--- a/sim/testsuite/sim/bfin/se_all32bitopcodes.S
+++ b/sim/testsuite/sim/bfin/se_all32bitopcodes.S
@@ -64,6 +64,19 @@
R0 = R0 + R1;
1:
+.ifndef BFIN_JTAG
+ /* Skip debug insns when running in the sim. */
+ R1.L = 0xff00;
+ R1.H = 0x0000;
+ R2 = R0 & R1;
+ R1.L = 0xf000;
+ CC = R1 == R2;
+ IF !CC jump 1f (bp);
+ R0.L = 0xf100;
+ R0.H = 0x0000;
+1:
+.endif
+
[P5] = R0;
.endm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20130624/3db12860/attachment.sig>
More information about the Gdb-patches
mailing list