mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-28 05:50:37 +00:00
tests/tcg/xtensa: fix watchpoint test
xtensa core may have only one set of DBREAKA/DBREAKC registers. Don't hardcode register numbers in the test as 0 and 1, use macros that only index valid DBREAK* registers. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
This commit is contained in:
parent
8164f14bb9
commit
64407f6a9e
@ -200,64 +200,70 @@ test_end
|
||||
.endm
|
||||
|
||||
#if XCHAL_NUM_DBREAK
|
||||
#define DB0 0
|
||||
#if XCHAL_NUM_DBREAK > 1
|
||||
#define DB1 1
|
||||
#else
|
||||
#define DB1 0
|
||||
#endif
|
||||
test dbreak_exact
|
||||
dbreak_test 0, 0x4000003f, 0xd000007f, 0xd000007f, l8ui
|
||||
dbreak_test 1, 0x4000003e, 0xd000007e, 0xd000007e, l16ui
|
||||
dbreak_test 0, 0x4000003c, 0xd000007c, 0xd000007c, l32i
|
||||
dbreak_test DB0, 0x4000003f, 0xd000007f, 0xd000007f, l8ui
|
||||
dbreak_test DB1, 0x4000003e, 0xd000007e, 0xd000007e, l16ui
|
||||
dbreak_test DB0, 0x4000003c, 0xd000007c, 0xd000007c, l32i
|
||||
|
||||
dbreak_test 1, 0x8000003f, 0xd000007f, 0xd000007f, s8i
|
||||
dbreak_test 0, 0x8000003e, 0xd000007e, 0xd000007e, s16i
|
||||
dbreak_test 1, 0x8000003c, 0xd000007c, 0xd000007c, s32i
|
||||
dbreak_test DB1, 0x8000003f, 0xd000007f, 0xd000007f, s8i
|
||||
dbreak_test DB0, 0x8000003e, 0xd000007e, 0xd000007e, s16i
|
||||
dbreak_test DB1, 0x8000003c, 0xd000007c, 0xd000007c, s32i
|
||||
test_end
|
||||
|
||||
test dbreak_overlap
|
||||
dbreak_test 0, 0x4000003f, 0xd000007d, 0xd000007c, l16ui
|
||||
dbreak_test 1, 0x4000003f, 0xd000007d, 0xd000007c, l32i
|
||||
test DBdbreak_overlap
|
||||
dbreak_test DB0, 0x4000003f, 0xd000007d, 0xd000007c, l16ui
|
||||
dbreak_test DB1, 0x4000003f, 0xd000007d, 0xd000007c, l32i
|
||||
|
||||
dbreak_test 0, 0x4000003e, 0xd000007e, 0xd000007f, l8ui
|
||||
dbreak_test 1, 0x4000003e, 0xd000007e, 0xd000007c, l32i
|
||||
dbreak_test DB0, 0x4000003e, 0xd000007e, 0xd000007f, l8ui
|
||||
dbreak_test DB1, 0x4000003e, 0xd000007e, 0xd000007c, l32i
|
||||
|
||||
dbreak_test 0, 0x4000003c, 0xd000007c, 0xd000007d, l8ui
|
||||
dbreak_test 1, 0x4000003c, 0xd000007c, 0xd000007c, l16ui
|
||||
dbreak_test DB0, 0x4000003c, 0xd000007c, 0xd000007d, l8ui
|
||||
dbreak_test DB1, 0x4000003c, 0xd000007c, 0xd000007c, l16ui
|
||||
|
||||
dbreak_test 0, 0x40000038, 0xd0000078, 0xd000007b, l8ui
|
||||
dbreak_test 1, 0x40000038, 0xd0000078, 0xd000007a, l16ui
|
||||
dbreak_test 0, 0x40000038, 0xd0000078, 0xd000007c, l32i
|
||||
dbreak_test DB0, 0x40000038, 0xd0000078, 0xd000007b, l8ui
|
||||
dbreak_test DB1, 0x40000038, 0xd0000078, 0xd000007a, l16ui
|
||||
dbreak_test DB0, 0x40000038, 0xd0000078, 0xd000007c, l32i
|
||||
|
||||
dbreak_test 1, 0x40000030, 0xd0000070, 0xd0000075, l8ui
|
||||
dbreak_test 0, 0x40000030, 0xd0000070, 0xd0000076, l16ui
|
||||
dbreak_test 1, 0x40000030, 0xd0000070, 0xd0000078, l32i
|
||||
dbreak_test DB1, 0x40000030, 0xd0000070, 0xd0000075, l8ui
|
||||
dbreak_test DB0, 0x40000030, 0xd0000070, 0xd0000076, l16ui
|
||||
dbreak_test DB1, 0x40000030, 0xd0000070, 0xd0000078, l32i
|
||||
|
||||
dbreak_test 0, 0x40000020, 0xd0000060, 0xd000006f, l8ui
|
||||
dbreak_test 1, 0x40000020, 0xd0000060, 0xd0000070, l16ui
|
||||
dbreak_test 0, 0x40000020, 0xd0000060, 0xd0000074, l32i
|
||||
dbreak_test DB0, 0x40000020, 0xd0000060, 0xd000006f, l8ui
|
||||
dbreak_test DB1, 0x40000020, 0xd0000060, 0xd0000070, l16ui
|
||||
dbreak_test DB0, 0x40000020, 0xd0000060, 0xd0000074, l32i
|
||||
|
||||
|
||||
dbreak_test 0, 0x8000003f, 0xd000007d, 0xd000007c, s16i
|
||||
dbreak_test 1, 0x8000003f, 0xd000007d, 0xd000007c, s32i
|
||||
dbreak_test DB0, 0x8000003f, 0xd000007d, 0xd000007c, s16i
|
||||
dbreak_test DB1, 0x8000003f, 0xd000007d, 0xd000007c, s32i
|
||||
|
||||
dbreak_test 0, 0x8000003e, 0xd000007e, 0xd000007f, s8i
|
||||
dbreak_test 1, 0x8000003e, 0xd000007e, 0xd000007c, s32i
|
||||
dbreak_test DB0, 0x8000003e, 0xd000007e, 0xd000007f, s8i
|
||||
dbreak_test DB1, 0x8000003e, 0xd000007e, 0xd000007c, s32i
|
||||
|
||||
dbreak_test 0, 0x8000003c, 0xd000007c, 0xd000007d, s8i
|
||||
dbreak_test 1, 0x8000003c, 0xd000007c, 0xd000007c, s16i
|
||||
dbreak_test DB0, 0x8000003c, 0xd000007c, 0xd000007d, s8i
|
||||
dbreak_test DB1, 0x8000003c, 0xd000007c, 0xd000007c, s16i
|
||||
|
||||
dbreak_test 0, 0x80000038, 0xd0000078, 0xd000007b, s8i
|
||||
dbreak_test 1, 0x80000038, 0xd0000078, 0xd000007a, s16i
|
||||
dbreak_test 0, 0x80000038, 0xd0000078, 0xd000007c, s32i
|
||||
dbreak_test DB0, 0x80000038, 0xd0000078, 0xd000007b, s8i
|
||||
dbreak_test DB1, 0x80000038, 0xd0000078, 0xd000007a, s16i
|
||||
dbreak_test DB0, 0x80000038, 0xd0000078, 0xd000007c, s32i
|
||||
|
||||
dbreak_test 1, 0x80000030, 0xd0000070, 0xd0000075, s8i
|
||||
dbreak_test 0, 0x80000030, 0xd0000070, 0xd0000076, s16i
|
||||
dbreak_test 1, 0x80000030, 0xd0000070, 0xd0000078, s32i
|
||||
dbreak_test DB1, 0x80000030, 0xd0000070, 0xd0000075, s8i
|
||||
dbreak_test DB0, 0x80000030, 0xd0000070, 0xd0000076, s16i
|
||||
dbreak_test DB1, 0x80000030, 0xd0000070, 0xd0000078, s32i
|
||||
|
||||
dbreak_test 0, 0x80000020, 0xd0000060, 0xd000006f, s8i
|
||||
dbreak_test 1, 0x80000020, 0xd0000060, 0xd0000070, s16i
|
||||
dbreak_test 0, 0x80000020, 0xd0000060, 0xd0000074, s32i
|
||||
dbreak_test DB0, 0x80000020, 0xd0000060, 0xd000006f, s8i
|
||||
dbreak_test DB1, 0x80000020, 0xd0000060, 0xd0000070, s16i
|
||||
dbreak_test DB0, 0x80000020, 0xd0000060, 0xd0000074, s32i
|
||||
test_end
|
||||
|
||||
test dbreak_invalid
|
||||
dbreak_test 0, 0x40000030, 0xd0000071, 0xd0000070, l16ui
|
||||
dbreak_test 1, 0x40000035, 0xd0000072, 0xd0000070, l32i
|
||||
test DBdbreak_invalid
|
||||
dbreak_test DB0, 0x40000030, 0xd0000071, 0xd0000070, l16ui
|
||||
dbreak_test DB1, 0x40000035, 0xd0000072, 0xd0000070, l32i
|
||||
test_end
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user