|
|
1.1 root 1:
2: /* ORL2 (or long 2 operand) test */
3:
4: /*Test name = orl2 */
5: /*Description = */
6: /* This test checks 'orl2' instruction as follows: */
7: /* destination = r1, memory location (dest) */
8: /* destination mask result Z N C V(flags) */
9: /* ___________ ____ _____ _____________ */
10: /* 0xaaaaaaaa 0xaaaaaaaa 0xaaaaaaaa 0 0 1 0 */
11: /* 0xaaaaaaaa 0x55555555 0xffffffff 0 0 1 0 */
12: /* 0x00000000 0x00000000 0x00000000 1 0 x 0 */
13: /* */
14: /* */
15: /* */
16: /* */
17: /* Constants */
18: /* */
19: .set VALUEB,0x555555aa
20: .set VALUEW,0X5555aaaa
21: .set VALUEL,0xaaaaaaaa
22: .set VALUE3B,0X00000000
23: .set VALUE3W,VALUE3B
24: .set VALUE3L,VALUE3B
25: .set MASK1B,0xaa
26: .set MASK1W,0xaaaa
27: .set MASK1L,0xaaaaaaaa
28: .set MASK2B,0x55
29: .set MASK2W,0x5555
30: .set MASK2L,0x55555555
31: .set MASK3B,0x00
32: .set MASK3W,0x0000
33: .set MASK3L,0x00000000
34: .set EXP1B,0x555555aa
35: .set EXP1W,0x5555aaaa
36: .set EXP1L,0xaaaaaaaa
37: .set EXP2B,0x555555ff
38: .set EXP2W,0x5555ffff
39: .set EXP2L,0xffffffff
40: .set EXP3B,0x00000000
41: .set EXP3W,EXP3B
42: .set EXP3L,EXP3B
43:
44: /* */
45: /* */
46: /* */
47: /* Syst.s - constants */
48: /* */
49: .set IPL,8
50: .set HIGH,31
51: .set ZERO,0
52: .set ONES,0xffffffff
53: .set N,8
54: .set Z,4
55: .set V,2
56: .set C,1
57: .set T,16
58: .set IV,32
59: .set FU,64
60: .set DV,128
61: .set PSWMASK,0x003f
62:
63: .globl _or_l2
64: _or_l2:
65: callf $4,_setjmp /* save context for error return */
66: movab _or_l2,_stpc /* save subtest starting address */
67: movl $1,_subtst /* subtest number */
68: movl $2,_no_opr /* number of operands in use */
69: movl $MASK1L,_opr /* first operand in use */
70: movl $VALUEL,_opr + 4 /* second operand in use */
71: 0:
72: bicpsw $PSWMASK /*turn overflow enable bit off */
73: movl $VALUEL,r4 /*set r4 = 0xaaaaaaaa */
74: bispsw $(Z|V|C) /*overflow, Z & carry bits ON */
75: orl2 $MASK1L,r4 /*mask r4 with 0xaaaaaaaa data to reg */
76: jeql error1 /*error if Z = 1 */
77: jgeq error1 /*error if N = 0 */
78: jcc error1 /*error if C = 0 */
79: jvs error1 /*error if V = 1 */
80: jmp 1f
81: error1: movpsl _actual /* actual = psl MAYBE incorrect */
82: bbs $0,_scoplp,0b /* if set scope loop on error */
83: movl $2,_ercode /* error code flag failure */
84: jmp *badrtn
85: 1: cmpl r4,$EXP1L /*if r4 <> expected, */
86: jeql o2
87: bbs $0,_scoplp,0b /* if set scope loop on error */
88: movl $1,_ercode /* error code data miscompare */
89: movl r4,_actual /* actual data */
90: movl $EXP1L,_expected /* expected data */
91: jmp *badrtn
92:
93: /* Now try another mask(0x55555555) reg to reg */
94: /* */
95:
96: o2:
97: bbs $0,_force_lp,0b /* if set loop on last subtest */
98: ao2: callf $4,_setjmp /* save context for error return */
99: movab ao2,_stpc /* save subtest starting address */
100: movl $2,_subtst /* subtest number */
101: movl $2,_no_opr /* number of operands in use */
102: movl $MASK2L,_opr /* first operand in use */
103: movl $VALUEL,_opr + 4 /* second operand in use */
104: 0: bicpsw $PSWMASK /*turn overflow enable bit off */
105: movl $VALUEL,r4 /*set r4 = 0xaaaaaaaaaa */
106: movl $MASK2L,r3 /* set up r3 as mask reg */
107: bispsw $(Z|V) /*overflow & zero bits ON */
108: orl2 r3,r4 /*mask r4 with 0x55555555 reg to reg */
109: jeql error2 /*error if Z = 1 */
110: jgeq error2 /*error if N = 0 */
111: jcc error2 /*error if C = 0 */
112: jvs error2 /*error if V = 1 */
113: jmp 1f
114: error2: movpsl _actual /* actual = psl MAYBE incorrect */
115: bbs $0,_scoplp,0b /* if set scope loop on error */
116: movl $2,_ercode /* error code flag failure */
117: jmp *badrtn
118: 1: cmpl r4,$EXP2L /*if r4 <> expected, */
119: jeql o3
120: bbs $0,_scoplp,0b /* if set scope loop on error */
121: movl $1,_ercode /* error code data miscompare */
122: movl r4,_actual /* actual data */
123: movl $EXP2L,_expected /* expected data */
124: jmp *badrtn
125: /* */
126: /* Now try another mask(0x00000000) & dest(0x00000000) */
127: /* */
128:
129: o3:
130: bbs $0,_force_lp,0b /* if set loop on last subtest */
131: ao3: callf $4,_setjmp /* save context for error return */
132: movab ao3,_stpc /* save subtest starting address */
133: movl $3,_subtst /* subtest number */
134: movl $2,_no_opr /* number of operands in use */
135: movl $MASK3L,_opr /* first operand in use */
136: movl $VALUE3L,_opr + 4 /* second operand in use */
137: 0: bicpsw $PSWMASK /*turn overflow enable bit off */
138: movl $VALUE3L,r4 /*set r4 = 0x00000000 */
139: bispsw $(N|V) /*overflow & negetive bits ON */
140: orl2 $MASK3L,r4 /*mask r4 with 0x00000000 */
141: jneq error3 /*error if Z = 0 */
142: jlss error3 /*error if N = 1 */
143: jcc error3 /*error if C = 0 */
144: jvs error3 /*error if V = 1 */
145: jmp 1f
146: error3: movpsl _actual /* actual = psl MAYBE incorrect */
147: bbs $0,_scoplp,0b /* if set scope loop on error */
148: movl $2,_ercode /* error code flag failure */
149: jmp *badrtn
150: 1: cmpl r4,$EXP3L /*if r4 <> expected, */
151: jeql orl2m
152: bbs $0,_scoplp,0b /* if set scope loop on error */
153: movl $1,_ercode /* error code data miscompare */
154: movl r4,_actual /* actual data */
155: movl $EXP3L,_expected /* expected data */
156: jmp *badrtn
157:
158: /* */
159: /* Now use memory location instead of register as destination */
160: /* */
161: orl2m:
162: bbs $0,_force_lp,0b /* if set loop on last subtest */
163: ao4: callf $4,_setjmp /* save context for error return */
164: movab ao4,_stpc /* save subtest starting address */
165: movl $4,_subtst /* subtest number */
166: movl $2,_no_opr /* number of operands in use */
167: movl $MASK1L,_opr /* first operand in use */
168: movl $VALUEL,_opr + 4 /* second operand in use */
169: 0: bicpsw $PSWMASK /*turn overflow enable bit off */
170: movl $VALUEL,dest /*set dest = 0xaaaaaaaa */
171: bispsw $(Z|V|C) /*overflow, Z & carry bits ON */
172: orl2 $MASK1L,dest /*mask dest with 0xaaaaaaaa data to mem */
173: jeql error4 /*error if Z = 1 */
174: jgeq error4 /*error if N = 0 */
175: jcc error4 /*error if C = 0 */
176: jvs error4 /*error if V = 1 */
177: jmp 1f
178: error4: movpsl _actual /* actual = psl MAYBE incorrect */
179: bbs $0,_scoplp,0b /* if set scope loop on error */
180: movl $2,_ercode /* error code flag failure */
181: jmp *badrtn
182: 1: cmpl dest,$EXP1L /*if dest <> expected, */
183: jeql o5
184: bbs $0,_scoplp,0b /* if set scope loop on error */
185: movl $1,_ercode /* error code data miscompare */
186: movl dest,_actual /* actual data */
187: movl $EXP1L,_expected /* expected data */
188: jmp *badrtn
189:
190: /* Now try another mask(0x55555555) reg to mem */
191: /* */
192:
193: o5:
194: bbs $0,_force_lp,0b /* if set loop on last subtest */
195: ao5: callf $4,_setjmp /* save context for error return */
196: movab ao5,_stpc /* save subtest starting address */
197: movl $5,_subtst /* subtest number */
198: movl $2,_no_opr /* number of operands in use */
199: movl $MASK2L,_opr /* first operand in use */
200: movl $VALUEL,_opr + 4 /* second operand in use */
201: 0: bicpsw $PSWMASK /*turn overflow enable bit off */
202: movl $VALUEL,dest /*set dest = 0xaaaaaaaa */
203: movl $MASK2L,r3 /* set r3 as mask reg */
204: bispsw $(Z|V) /*overflow & zero bits ON */
205: orl2 r3,dest /*mask dest with 0x55555555 reg to mem */
206: jeql error5 /*error if Z = 1 */
207: jgeq error5 /*error if N = 0 */
208: jcc error5 /*error if C = 0 */
209: jvs error5 /*error if V = 1 */
210: jmp 1f
211: error5: movpsl _actual /* actual = psl MAYBE incorrect */
212: bbs $0,_scoplp,0b /* if set scope loop on error */
213: movl $2,_ercode /* error code flag failure */
214: jmp *badrtn
215: 1: cmpl dest,$EXP2L /*if dest <> expected, */
216: jeql o6
217: bbs $0,_scoplp,0b /* if set scope loop on error */
218: movl $1,_ercode /* error code data miscompare */
219: movl dest,_actual /* actual data */
220: movl $EXP2L,_expected /* expected data */
221: jmp *badrtn
222:
223:
224: /* */
225: /* Now try another mask(0x00000000) & dest(0x00000000) */
226: /* */
227:
228: o6:
229: bbs $0,_force_lp,0b /* if set loop on last subtest */
230: ao6: callf $4,_setjmp /* save context for error return */
231: movab ao6,_stpc /* save subtest starting address */
232: movl $6,_subtst /* subtest number */
233: movl $2,_no_opr /* number of operands in use */
234: movl $MASK3L,_opr /* first operand in use */
235: movl $VALUE3L,_opr + 4 /* second operand in use */
236: 0: bicpsw $PSWMASK /*turn overflow enable bit off */
237: movl $VALUE3L,dest /*set dest = 0x00000000 */
238: bispsw $(N|V) /*overflow & negetive bits ON */
239: orl2 $MASK3L,dest /*mask dest with 0x00000000 */
240: jneq error6 /*error if Z = 0 */
241: jlss error6 /*error if N = 1 */
242: jcc error6 /*error if C = 0 */
243: jvs error6 /*error if V = 1 */
244: jmp 1f
245: error6: movpsl _actual /* actual = psl MAYBE incorrect */
246: bbs $0,_scoplp,0b /* if set scope loop on error */
247: movl $2,_ercode /* error code flag failure */
248: jmp *badrtn
249: 1: cmpl dest,$EXP3L /*if dest <> expected, */
250: jeql aldn
251: bbs $0,_scoplp,0b /* if set scope loop on error */
252: movl $1,_ercode /* error code data miscompare */
253: movl dest,_actual /* actual data */
254: movl $EXP3L,_expected /* expected data */
255: jmp *badrtn
256:
257:
258: aldn: bbs $0,_force_lp,0b /* if set loop on last subtest */
259: jmp *return /* good, return to monitor */
260:
261: /* */
262: /* variables */
263: /* */
264: .align 2
265: dest: .space 4
266:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.