diff options
author | Mike Frysinger <vapier@gentoo.org> | 2013-06-17 04:47:26 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2013-06-17 04:47:26 +0000 |
commit | 9fb7353ff044b89da5256945348d8b6ea33a0032 (patch) | |
tree | 23c4cb7826804a4275f694711414cb3c85479666 /sim | |
parent | 7a56db5f46dd6f2168092f7759c572017011dfc5 (diff) | |
download | gdb-9fb7353ff044b89da5256945348d8b6ea33a0032.zip gdb-9fb7353ff044b89da5256945348d8b6ea33a0032.tar.gz gdb-9fb7353ff044b89da5256945348d8b6ea33a0032.tar.bz2 |
sim: bfin: add helpful info for generating test tables
Diffstat (limited to 'sim')
-rw-r--r-- | sim/testsuite/sim/bfin/ChangeLog | 4 | ||||
-rw-r--r-- | sim/testsuite/sim/bfin/se_allopcodes.h | 19 |
2 files changed, 23 insertions, 0 deletions
diff --git a/sim/testsuite/sim/bfin/ChangeLog b/sim/testsuite/sim/bfin/ChangeLog index 753affc..a634494 100644 --- a/sim/testsuite/sim/bfin/ChangeLog +++ b/sim/testsuite/sim/bfin/ChangeLog @@ -1,5 +1,9 @@ 2013-06-17 Mike Frysinger <vapier@gentoo.org> + * se_allopcodes.h: Add debugging related comments. + +2013-06-17 Mike Frysinger <vapier@gentoo.org> + * se_allopcodes.h: Do not clear RETN/RETE/RETI. 2012-04-09 Robin Getz <robin.getz@analog.com> diff --git a/sim/testsuite/sim/bfin/se_allopcodes.h b/sim/testsuite/sim/bfin/se_allopcodes.h index b49862a..8f96125 100644 --- a/sim/testsuite/sim/bfin/se_allopcodes.h +++ b/sim/testsuite/sim/bfin/se_allopcodes.h @@ -129,6 +129,25 @@ _match_done: jump _next_instruction; _new_instruction: + /* The table is generated in memory and can be extracted: + (gdb) dump binary memory bin &table next_location + + 16bit: + $ od -j6 -x --width=4 bin | \ + awk '{ s=last; e=strtonum("0x"$2); \ + printf "\t.dw 0x%04x,\t0x%04x,\t\t0x%02x\n", \ + s, e-1, strtonum("0x"seq); \ + last=e; seq=$3}' + + 32bit: + $ od -j12 -x --width=8 bin | \ + awk '{ s=last; e=strtonum("0x"$3$2); \ + printf "\t.dw 0x%04x, 0x%04x,\t0x%04x, 0x%04x,\t\t0x%02x, 0\n", \ + and(s,0xffff), rshift(s,16), and(e-1,0xffff), rshift(e-1,16), \ + strtonum("0x"seq); \ + last=e; seq=$3}' + + This should be much faster than dumping over serial/jtag. */ se_all_new_insn_stub /* output the insn (R0) and excause (R3) if diff from last */ |