sh1.s
5.34 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
/****************************************************************
This program tests the instruction: sh
****************************************************************/
#include "suregre.h"
.base 0x04001000
.data 0x04000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
.word 0x00000000
LI(r0 , 0xFFFF, 0xFFFF);
LI(r1 , 0x0101, 0x0101);
LI(r2 , 0x0202, 0x0202);
LI(r3 , 0x0303, 0x0303);
LI(r4 , 0x0404, 0x0404);
LI(r5 , 0x0505, 0x0505);
LI(r6 , 0x0606, 0x0606);
LI(r7 , 0x0707, 0x0707);
LI(r8 , 0x0808, 0x0808);
LI(r9 , 0x0909, 0x0909);
LI(r10, 0x0A0A, 0x0A0A);
LI(r11, 0x0B0B, 0x0B0B);
LI(r12, 0x0C0C, 0x0C0C);
LI(r13, 0x0D0D, 0x0D0D);
LI(r14, 0x0E0E, 0x0E0E);
LI(r15, 0x0F0F, 0x0F0F);
LI(r16, 0x1010, 0x1010);
LI(r17, 0x1111, 0x1111);
LI(r18, 0x1212, 0x1212);
LI(r19, 0x1313, 0x1313);
LI(r20, 0x1414, 0x1414);
LI(r21, 0x1515, 0x1515);
LI(r22, 0x1616, 0x1616);
LI(r23, 0x1717, 0x1717);
LI(r24, 0x1818, 0x1818);
LI(r25, 0x1919, 0x1919);
LI(r26, 0x1A1A, 0x1A1A);
LI(r27, 0x1B1B, 0x1B1B);
LI(r28, 0x1C1C, 0x1C1C);
LI(r29, 0x1D1D, 0x1D1D);
LI(r30, 0x1E1E, 0x1E1E);
LI(r31, 0x1F1F, 0x1F1F);
lqv v0[0], 0 (r0);
vxor v0 , v0, v0
vxor v1 , v0, v0
vxor v2 , v0, v0
vxor v3 , v0, v0
vxor v4 , v0, v0
vxor v5 , v0, v0
vxor v6 , v0, v0
vxor v7 , v0, v0
vxor v8 , v0, v0
vxor v9 , v0, v0
vxor v10, v0, v0
vxor v11, v0, v0
vxor v12, v0, v0
vxor v13, v0, v0
vxor v14, v0, v0
vxor v15, v0, v0
vxor v16, v0, v0
vxor v17, v0, v0
vxor v18, v0, v0
vxor v19, v0, v0
vxor v20, v0, v0
vxor v21, v0, v0
vxor v22, v0, v0
vxor v23, v0, v0
vxor v24, v0, v0
vxor v25, v0, v0
vxor v26, v0, v0
vxor v27, v0, v0
vxor v28, v0, v0
vxor v29, v0, v0
vxor v30, v0, v0
vxor v31, v0, v0
ChkSt( 1,sh,r5 ,0x0505,0x0505,0x0000,0x0000,r3 ,r4 ,0x0000,0x1001,0x0400,0x0000,0x1001,0x0000,r2 )
ChkSt( 2,sh,r6 ,0x0606,0x0606,0x0002,0x0000,r4 ,r5 ,0x0000,0x2002,0x0400,0x0000,0x1001,0x2002,r3 )
ChkSt( 3,sh,r7 ,0x0707,0x0707,0x0004,0x0004,r5 ,r6 ,0x0000,0x4004,0x0400,0x0000,0x4004,0x0000,r4 )
ChkSt( 4,sh,r8 ,0x0808,0x0808,0x0006,0x0004,r6 ,r7 ,0x0000,0x8008,0x0400,0x0000,0x4004,0x8008,r5 )
ChkSt( 5,sh,r9 ,0x0909,0x0909,0x0008,0x0008,r7 ,r8 ,0x0001,0x0010,0x0400,0x0000,0x0010,0x0000,r6 )
ChkSt( 6,sh,r10,0x0A0A,0x0A0A,0x000A,0x0008,r8 ,r9 ,0x0002,0x0020,0x0400,0x0000,0x0010,0x0020,r7 )
ChkSt( 7,sh,r11,0x0B0B,0x0B0B,0x000C,0x000C,r9 ,r10,0x0004,0x0040,0x0400,0x0000,0x0040,0x0000,r8 )
ChkSt( 8,sh,r12,0x0C0C,0x0C0C,0x000E,0x000C,r10,r11,0x0008,0x0080,0x0400,0x0000,0x0040,0x0080,r9 )
ChkSt( 9,sh,r13,0x0D0D,0x0D0D,0x0010,0x0010,r11,r12,0x0000,0xFF00,0x0400,0x0000,0xFF00,0x0000,r10)
ChkSt(10,sh,r14,0x0E0E,0x0E0E,0x0012,0x0010,r12,r13,0x0001,0xFE00,0x0400,0x0000,0xFF00,0xFE00,r11)
ChkSt(11,sh,r15,0x0F0F,0x0F0F,0x0014,0x0014,r13,r14,0x0003,0xFC00,0x0400,0x0000,0xFC00,0x0000,r12)
ChkSt(12,sh,r16,0x1010,0x1010,0x0016,0x0014,r14,r15,0x0007,0xF800,0x0400,0x0000,0xFC00,0xF800,r13)
ChkSt(13,sh,r17,0x1111,0x1111,0x0018,0x0018,r15,r16,0x000F,0xF000,0x0400,0x0000,0xF000,0x0000,r14)
ChkSt(14,sh,r18,0x1212,0x1212,0x001A,0x0018,r16,r17,0x001F,0xE000,0x0400,0x0000,0xF000,0xE000,r15)
ChkSt(15,sh,r19,0x1313,0x1313,0x001C,0x001C,r17,r18,0x003F,0xC000,0x0400,0x0000,0xC000,0x0000,r16)
ChkSt(16,sh,r20,0x1414,0x1414,0x001E,0x001C,r18,r19,0x007F,0x8000,0x0400,0x0000,0xC000,0x8000,r17)
ChkSt(17,sh,r21,0x1515,0x1515,0xFFFE,0xFFFC,r19,r20,0x0000,0x1001,0x0400,0x0020,0xC000,0x1001,r18)
ChkSt(18,sh,r22,0x1616,0x1616,0xFFFC,0xFFFC,r20,r21,0x0000,0x2002,0x0400,0x0020,0x2002,0x1001,r19)
ChkSt(19,sh,r23,0x1717,0x1717,0xFFFA,0xFFF8,r21,r22,0x0000,0x4004,0x0400,0x0020,0xF000,0x4004,r20)
ChkSt(20,sh,r24,0x1818,0x1818,0xFFF8,0xFFF8,r22,r23,0x0000,0x8008,0x0400,0x0020,0x8008,0x4004,r21)
ChkSt(21,sh,r25,0x1919,0x1919,0xFFF6,0xFFF4,r23,r24,0x0001,0x0010,0x0400,0x0020,0xFC00,0x0010,r22)
ChkSt(22,sh,r26,0x1A1A,0x1A1A,0xFFF4,0xFFF4,r24,r25,0x0002,0x0020,0x0400,0x0020,0x0020,0x0010,r23)
ChkSt(23,sh,r27,0x1B1B,0x1B1B,0xFFF2,0xFFF0,r25,r26,0x0004,0x0040,0x0400,0x0020,0xFF00,0x0040,r24)
ChkSt(24,sh,r28,0x1C1C,0x1C1C,0xFFF0,0xFFF0,r26,r27,0x0008,0x0080,0x0400,0x0020,0x0080,0x0040,r25)
ChkSt(25,sh,r29,0x1D1D,0x1D1D,0xFFEE,0xFFEC,r27,r28,0x0000,0xFF00,0x0400,0x0020,0x0040,0xFF00,r26)
ChkSt(26,sh,r30,0x1E1E,0x1E1E,0xFFEC,0xFFEC,r28,r29,0x0001,0xFE00,0x0400,0x0020,0xFE00,0xFF00,r27)
ChkSt(27,sh,r2 ,0x1001,0x0000,0xFFEA,0xFFE8,r29,r30,0x0003,0xFC00,0x0400,0x0020,0x0010,0xFC00,r28)
ChkSt(28,sh,r3 ,0x1001,0x2002,0xFFE8,0xFFE8,r30,r2 ,0x0007,0xF800,0x0400,0x0020,0xF800,0xFC00,r29)
ChkSt(29,sh,r4 ,0x4004,0x0000,0xFFE6,0xFFE4,r2 ,r3 ,0x000F,0xF000,0x0400,0x0020,0x4004,0xF000,r30)
ChkSt(30,sh,r5 ,0x4004,0x8008,0xFFE4,0xFFE4,r3 ,r4 ,0x001F,0xE000,0x0400,0x0020,0xE000,0xF000,r2 )
ChkSt(31,sh,r6 ,0x0010,0x0000,0xFFE2,0xFFE0,r4 ,r5 ,0x003F,0xC000,0x0400,0x0020,0x1001,0xC000,r3 )
ChkSt(32,sh,r7 ,0x0010,0x0020,0xFFE0,0xFFE0,r5 ,r6 ,0x007F,0x8000,0x0400,0x0020,0x8000,0xC000,r4 )
ori r1, r0, 0xFEED;
Fail: break;