diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-04-09 03:42:43 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2012-04-09 03:42:43 +0000 |
commit | 8faad9bd0f2d55b33a718bd950982439deca6c03 (patch) | |
tree | ddd055c60dbb0e9b509b6251836a24f5e19ba4ca /sim/testsuite/sim/bfin/se_allopcodes.h | |
parent | 6aa0db85fbaedf8ad38f900fb16fbf771783d4b5 (diff) | |
download | binutils-gdb-8faad9bd0f2d55b33a718bd950982439deca6c03.tar.gz |
sim: bfin: unify se_all helpers more
Now that we have the se_all helpers together and working, we can see
what pieces are duplicated in each test and unify them in the common
header file.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'sim/testsuite/sim/bfin/se_allopcodes.h')
-rw-r--r-- | sim/testsuite/sim/bfin/se_allopcodes.h | 47 |
1 files changed, 29 insertions, 18 deletions
diff --git a/sim/testsuite/sim/bfin/se_allopcodes.h b/sim/testsuite/sim/bfin/se_allopcodes.h index 2e4567373d3..7ff8d2b9fa0 100644 --- a/sim/testsuite/sim/bfin/se_allopcodes.h +++ b/sim/testsuite/sim/bfin/se_allopcodes.h @@ -10,6 +10,14 @@ b0 = r0; b1 = r0; b2 = r0; b3 = r0; .endm +#if SE_ALL_BITS == 32 +# define LOAD_PFX +#elif SE_ALL_BITS == 16 +# define LOAD_PFX W +#else +# error "Please define SE_ALL_BITS" +#endif + /* * execute a test of an opcode space. host test * has to fill out a number of callbacks. @@ -176,36 +184,39 @@ _table: _table_end: .endm -.macro se_all_new_16bit_insn_log -.ifdef BFIN_JTAG_xxxxx - R1 = R0; - R0 = 0x4; - call __emu_out; - R0 = R1 << 16; - R0 = R0 | R3; - call __emu_out; -.else - loadsym P0, _next_location; - P1 = [P0]; - W[P1++] = R0; - W[P1++] = R3; - [P0] = P1; -.endif +.macro se_all_load_table + R7 = LOAD_PFX[P1++]; + R6 = LOAD_PFX[P1++]; + R5 = LOAD_PFX[P1++]; +.endm + +#ifndef SE_ALL_NEW_INSN_STUB +.macro se_all_new_insn_stub + jump fail_lvl; .endm -.macro se_all_new_32bit_insn_log +#endif + +.macro se_all_new_insn_log .ifdef BFIN_JTAG_xxxxx R1 = R0; +#if SE_ALL_BITS == 32 R0 = 0x8; call __emu_out; R0 = R1; call __emu_out; R0 = R3; +#else + R0 = 0x4; + call __emu_out; + R0 = R1 << 16; + R0 = R0 | R3; +#endif call __emu_out; .else loadsym P0, _next_location; P1 = [P0]; - [P1++] = R0; - [P1++] = R3; + LOAD_PFX[P1++] = R0; + LOAD_PFX[P1++] = R3; [P0] = P1; .endif .endm |