sim: bfin: speed up all insn testcases slightly
authorMike Frysinger <vapier@gentoo.org>
Mon, 24 Jun 2013 01:44:55 +0000 (01:44 +0000)
committerMike Frysinger <vapier@gentoo.org>
Mon, 24 Jun 2013 01:44:55 +0000 (01:44 +0000)
The main body of the "all insn" test is executed once per tested insn, and
we test millions of insns here.  Any shrinkage we can do in this loop will
speed things up nicely (since it's multiplied per tested insn).

To that end, simplify the end-of-table test into one less insn, and omit
the SSYNC when we build for the sim.  When we build to run on the hardware,
this insn matters, but the sim doesn't have write store buffers in the chip
that might get in the way (memory writes are atomic).

sim/testsuite/sim/bfin/ChangeLog
sim/testsuite/sim/bfin/se_allopcodes.h

index ddcce86c996e50a44e7437612946cc4df29a11ed..11a307285f0da6eaf9fe02dcaf61c2fe82fd2718 100644 (file)
@@ -1,3 +1,8 @@
+2013-06-23  Mike Frysinger  <vapier@gentoo.org>
+
+       * se_allopcodes.h (_match): Simplify register test to one less insn.
+       Omit the SSYNC insn when compiling for the sim.
+
 2013-06-23  Mike Frysinger  <vapier@gentoo.org>
 
        * testutils.inc: Trim trailing whitespace.
index 8f961259abfc3369a43778a4ae295fbfea7ad86a..796d5c4e62b467410172bcafeebf42694032a14d 100644 (file)
@@ -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) */
@@ -168,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;
This page took 0.026874 seconds and 4 git commands to generate.