tizen 2.4 release
[external/binutils.git] / sim / testsuite / sim / bfin / se_regmv_usp_sysreg.S
1 //Original:/proj/frio/dv/testcases/seq/se_regmv_usp_sysreg/se_regmv_usp_sysreg.dsp
2 // Description: RegMV USP to SYSREG
3 # mach: bfin
4 # sim: --environment operating
5
6 #include "test.h"
7 .include "testutils.inc"
8 start
9
10 //
11 // Constants and Defines
12 //
13
14 include(selfcheck.inc)
15 include(std.inc)
16 include(symtable.inc)
17
18 //*********************************************************************
19
20 BEGIN:
21
22     // KLUDGE: from perl script must place cycles 2 write before cycles
23     // write, and cycles 2 read AFTER cycles read
24
25     // PUT YOUR TEST HERE!
26     R0 = 0;
27 SP = R0;
28 SYSCFG = R0;
29
30 CHECK_INIT_DEF(p0); //CHECK_INIT(p0, 0xFF7FFFFC);
31
32     R0 = 0x59c4 (Z);
33     R0.H = 0x95a6;
34 USP = R0;
35 ASTAT = USP;
36     R1 = ASTAT;
37
38     R0 = 0xd4a4 (Z);
39     R0.H = 0xd16c;
40 USP = R0;
41 RETS = USP;
42     R1 = RETS;
43 CHECKREG(r1, 3513570468);
44
45     R0 = 0x2bca (Z);
46     R0.H = 0x6ad8;
47 USP = R0;
48 LC0 = USP;
49     R1 = LC0;
50 CHECKREG(r1, 1792551882);
51
52     R0 = 0x6d4a (Z);
53     R0.H = 0xada2;
54 USP = R0;
55 LT0 = USP;
56     R1 = LT0;
57 CHECKREG(r1, 2913103178);
58
59     R0 = 0x6b18 (Z);
60     R0.H = 0x931c;
61 USP = R0;
62 LB0 = USP;
63     R1 = LB0;
64 CHECKREG(r1, 2468113176);
65
66     R0 = 0x62da (Z);
67     R0.H = 0x16ee;
68 USP = R0;
69 LC1 = USP;
70     R1 = LC1;
71 CHECKREG(r1, 384721626);
72
73     R0 = 0x7c60 (Z);
74     R0.H = 0xf7c8;
75 USP = R0;
76 LT1 = USP;
77     R1 = LT1;
78 CHECKREG(r1, 4157111392);
79
80     R0 = 0x182 (Z);
81     R0.H = 0x942;
82 USP = R0;
83 LB1 = USP;
84     R1 = LB1;
85 CHECKREG(r1, 155320706);
86
87     R0 = 0xd5a2 (Z);
88     R0.H = 0x8782;
89 USP = R0;
90 CYCLES2 = USP;
91                     // KLUDGE - moved read after that for cycles
92
93     R0 = 0x297c (Z);
94     R0.H = 0x9d06;
95 USP = R0;
96 CYCLES = USP;
97     R1 = CYCLES;
98 CHECKREG(r1, 2634426748);
99     R1 = CYCLES2;   // KLUDGE moved read after that for cycles
100 CHECKREG(r1, 2273498530);
101
102     R0 = 0x8c66 (Z);
103     R0.H = 0x3d64;
104 USP = R0;
105 SEQSTAT = USP;
106     R1 = SEQSTAT;
107
108     R0 = 0x3b8c (Z);
109     R0.H = 0xdcd4;
110 USP = R0;
111 SYSCFG = USP;
112     R1 = SYSCFG;
113
114     R0 = 0xb1ae (Z);
115     R0.H = 0x6f6;
116 USP = R0;
117 RETI = USP;
118     R1 = RETI;
119 CHECKREG(r1, 116830638);
120
121     R0 = 0x32b0 (Z);
122     R0.H = 0x9b7e;
123 USP = R0;
124 RETX = USP;
125     R1 = RETX;
126 CHECKREG(r1, 2608738992);
127
128     R0 = 0xea72 (Z);
129     R0.H = 0x11ea;
130 USP = R0;
131 RETN = USP;
132     R1 = RETN;
133 CHECKREG(r1, 300608114);
134
135     R0 = 0x2c58 (Z);
136     R0.H = 0xb13a;
137 USP = R0;
138 RETE = USP;
139     R1 = RETE;
140 CHECKREG(r1, 2973379672);
141
142 // Sanity check
143 USP = R0;
144 USP = R1;
145 USP = R2;
146 USP = R3;
147 USP = R4;
148 USP = R5;
149 USP = R6;
150 USP = R7;
151 USP = P0;
152 USP = P1;
153 USP = P2;
154 USP = P3;
155 USP = P4;
156 USP = P5;
157 USP = SP;
158 USP = FP;
159 USP = A0.X;
160 USP = A0.W;
161 USP = A1.X;
162 USP = A1.W;
163 A0.X = USP;
164 A0.W = USP;
165 A1.X = USP;
166 A1.W = USP;
167
168 END:
169 dbg_pass;            // End the test
170
171 //*********************************************************************