Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(480)

Unified Diff: sim/testsuite/sim/bfin/se_allopcodes.h

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sim/testsuite/sim/bfin/se_all32bitopcodes.S ('k') | sim/testsuite/sim/bfin/testutils.inc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sim/testsuite/sim/bfin/se_allopcodes.h
diff --git a/sim/testsuite/sim/bfin/se_allopcodes.h b/sim/testsuite/sim/bfin/se_allopcodes.h
index 7ff8d2b9fa0b55d1e6877236de8b06314128386e..796d5c4e62b467410172bcafeebf42694032a14d 100644
--- a/sim/testsuite/sim/bfin/se_allopcodes.h
+++ b/sim/testsuite/sim/bfin/se_allopcodes.h
@@ -102,8 +102,7 @@ _match:
se_all_load_table
/* is this the end of the table? */
- R4 = 0;
- CC = R4 == R7;
+ CC = R7 == 0;
IF CC jump _new_instruction;
/* is the opcode (R0) greater than the 2nd entry in the table (R6) */
@@ -129,6 +128,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 */
@@ -149,8 +167,10 @@ _legal_instruction:
_next_instruction:
se_all_next_insn
+.ifdef BFIN_JTAG
/* Make sure the opcode isn't in a write buffer */
SSYNC;
+.endif
R1 = P5;
RETX = R1;
@@ -158,9 +178,6 @@ _next_instruction:
/* set up pointers to valid data (32Meg), to reduce address violations */
reset_dags
RETS = r0;
- RETN = r0;
- RETE = r0;
- RETI = r0;
RTX;
« no previous file with comments | « sim/testsuite/sim/bfin/se_all32bitopcodes.S ('k') | sim/testsuite/sim/bfin/testutils.inc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698