sim: bfin: unify se_all helpers more
[deliverable/binutils-gdb.git] / sim / testsuite / sim / bfin / testset.s
CommitLineData
1d7b4a70
MF
1# Blackfin testcase for playing with TESTSET
2# mach: bfin
3
4 .include "testutils.inc"
5
6 start
7
8 .macro _ts val:req
9 /* Load value to the external data storage */
10 imm32 R0, \val
11 [P4] = R0;
12 FLUSHINV[P4];
13 SSYNC;
14 mnop;
15
16 imm32 R1, 0xdeadbeef
17 imm32 R2, 0xdeadbeef
18
19 TESTSET (P4);
20 SSYNC;
21 mnop;
22 mnop;
23
24 /* TESTSET will set CC based on low byte == 0 */
25 .if \val & 0xff
26 if CC jump 1f;
27 .else
28 if ! CC jump 1f;
29 .endif
30
31 /* Regardless of CC, the byte MSB is set to 1 */
32 imm32 R1, \val | 0x80
33
34 /* Make sure the result is what we want */
35 R2 = [P4];
36 FLUSHINV[P4];
37 SSYNC;
38 mnop;
39 CC = R2 == R1;
40 if ! CC jump 1f;
41 jump 2f;
421: fail
432:
44 .endm
45 .macro ts val:req
46 _ts \val
47 _ts ~(\val)
48 .endm
49
50 loadsym P4, _data
51
52 ts 0x00000000
53 ts 0x00000011
54 ts 0x11111111
55 ts 0x11111101
56 ts 0x11111110
57 ts 0x111111bb
58 ts 0xaaaaaa00
59 ts 0xabcd2222
60 ts 0x000000bb
61 ts 0x55555555
62 ts 0x5555550a
63 ts 0x00100010
64 ts 0x00100100
65 ts 0x33333000
66 ts 0x000000aa
67
68 pass
69
70.data
71_data:
72.long 0
73.size _data, .-_data
This page took 0.057868 seconds and 4 git commands to generate.