blob: 5ed54b58ec6f22c7317a8e2c24f4ad129d53e6f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
# Blackfin testcase for making sure RETX is the excepting insn
# and not the target of the insn (like indirect jumps)
# mach: bfin
# sim: --environment operating
#include "test.h"
.include "testutils.inc"
start
# Set our handler
imm32 P5, EVT3;
loadsym R1, _evtx;
[P5] = R1;
# Lower ourselves below EVT3
loadsym R4, _i_rts;
RETI = R4;
RAISE 12;
RTI;
_i_rts:
# Check unaligned RETS
loadsym R6, 1f;
loadsym R5, 2f;
R0 = 1;
RETS = R0;
1: RTS;
2:
_i_jump:
# Check unaligned indirect jump
loadsym R6, 1f;
loadsym R5, 2f;
P0 = 1;
1: JUMP (P0);
2:
_i_jump_off:
# Check unaligned indirect jump (pc-relative)
loadsym R6, 1f;
loadsym R5, 2f;
P0 = 1;
1: JUMP (PC + P0);
2:
_i_call:
# Check unaligned indirect call
loadsym R6, 1f;
loadsym R5, 2f;
P0 = 1;
1: CALL (P0);
2:
_pass_lvl:
dbg_pass
_evtx:
# Make sure R6 matches RETX
R7 = RETX;
CC = R6 == R7;
if !CC jump _fail_lvl;
# Move on to next test
RETX = R5;
RTX;
_fail_lvl:
dbg_fail
|