|
|
1.1 root 1: /* MOVL instruction test */
2: /* */
3: /* constant definitions */
4:
5: .set HIGH,31
6: .set IPL,8
7: .set ZERO,0
8: .set ONES,0xffffffff
9: .set DV,128
10: .set FU,64
11: .set IV,32
12: .set T,16
13: .set N,8
14: .set Z,4
15: .set V,2
16: .set C,1
17: .set NEGVAL,0xff0fffff
18:
19: .globl _movl
20: _movl:
21: bicpsw $(IV|T) /* disable overflow,trace exceptions */
22: movlmr: /* MOVE MEMORY TO REGISTER */
23: callf $4,_setjmp /* save context for error return */
24: movab movlmr,_stpc /* save address of subtest start */
25: movl $1,_subtst /* subtest number */
26: movl $1,_no_opr /* number of operands in use */
27: movl $NEGVAL,_opr /* first operand */
28: movl $NEGVAL,negval /* restore original value of negval */
29: 0: bispsw $(Z|V) /* set z,v flags */
30: bicpsw $(N|C) /* clear n,c flag */
31: movl negval,r4 /* move negative value to r4 mem to reg */
32: movpsl actpsl
33: jgeq error1 /* error if n flag not set */
34: jeql error1 /* error if z flag set */
35: jvs error1 /* error if v flag set */
36: jcc error1 /* error if c flag not set */
37: jmp 1f
38: error1: movpsl _actual /* actual = psl MAYBE it is incorrect */
39: bbs $0,_scoplp,0b /* if set scope loop on error */
40: movl $2,_ercode /* error code flag failure */
41: jmp *badrtn
42: 1: cmpl negval,r4 /* compare r4 to negval */
43: jeql 1f
44: bbs $0,_scoplp,0b /* if set scope loop on error */
45: movl $1,_ercode /* error code data miscompare */
46: movl r4,_actual /* actual data */
47: movl negval,_expected /* expected data */
48: jmp *badrtn
49: 1: cmpl $NEGVAL,negval /* make sure source unchanged */
50: jeql movlrr /* no error then continue */
51: bbs $0,_scoplp,0b /* if set scope loop on error */
52: movl $3,_ercode /* error code operand miscompare */
53: movl negval,_actual /* actual data */
54: movl $NEGVAL,_expected /* expected data */
55: jmp *badrtn
56: movlrr: /* MOVE REGISTER TO REGISTER */
57: bbs $0,_force_lp,0b /* if set loop on last subtest */
58: am2: callf $4,_setjmp /* save context for error return */
59: movab am2,_stpc /* save address of subtest start */
60: movl $2,_subtst /* subtest number */
61: movl $1,_no_opr /* number of operands in use */
62: movl $NEGVAL,_opr /* first operand */
63: 0: movl negval,r3 /* move negval to r3*/
64: bispsw $(Z|V|C) /* set z,v,c flags */
65: bicpsw $N /* clear N flag */
66: movl r3,r4 /* move r3 to r4 */
67: movpsl actpsl
68: jgeq error2 /* error if n flag not set */
69: jeql error2 /* error if z flag set */
70: jvs error2 /* error if v flag set */
71: jcc error2 /* error if c flag not set */
72: jmp 1f
73: error2: movpsl _actual /* actual = psl MAYBE it is incorrect */
74: bbs $0,_scoplp,0b /* if set scope loop on error */
75: movl $2,_ercode /* error code flag failure */
76: jmp *badrtn
77: 1: movl r4,r5 /* move r4 to r5 */
78: movl r5,r6 /* move r5 to r6 */
79: movl r6,r7 /* move r6 to r7 */
80: movl r7,r8 /* move r7 to r8 */
81: movl r8,r9 /* move r8 to r9 */
82: movl r9,r10 /* move r9 to r10 */
83: movl r10,r11 /* move r10 to r11 */
84: movl r11,r12 /* move r11 to r12 */
85: cmpl negval,r12 /* compare r12 to negval */
86: jeql 1f
87: bbs $0,_scoplp,0b /* if set scope loop on error */
88: movl $1,_ercode /* error code data miscompare */
89: movl r12,_actual /* actual data */
90: movl negval,_expected /* expected data */
91: jmp *badrtn
92: 1: cmpl r3,r11 /* make sure source unchanged */
93: jeql movlmm
94: bbs $0,_scoplp,0b /* if set scope loop on error */
95: movl $1,_ercode /* error code data miscompare */
96: movl r3,_actual /* actual data */
97: movl negval,_expected /* expected data */
98: jmp *badrtn
99: movlmm: /* MOVE REGISTER TO MEMORY */
100: bbs $0,_force_lp,0b /* if set loop on last subtest */
101: am3: callf $4,_setjmp /* save context for error return */
102: movab am3,_stpc /* save address of subtest start */
103: movl $3,_subtst /* subtest number */
104: movl $1,_no_opr /* number of operands in use */
105: movl zero,_opr /* first operand */
106: 0: movl zero,r3 /* load starting register */
107: bispsw $(N|V|C) /* set n,v,c flags */
108: bicpsw $Z /* clear z flag */
109: movl r3,negval /* clear negval */
110: movpsl actpsl
111: jlss error3 /* error if n flag set */
112: jneq error3 /* error if z flag not set */
113: jvs error3 /* error if v flag set */
114: jcc error3 /* error if c flag not set */
115: jmp 1f
116: error3: movpsl _actual /* actual = psl MAYBE it is incorrect */
117: bbs $0,_scoplp,0b /* if set scope loop on error */
118: movl $2,_ercode /* error code flag failure */
119: jmp *badrtn
120: 1: cmpl $ZERO,negval /* compare negval to 0 */
121: jeql 1f
122: bbs $0,_scoplp,0b /* if set scope loop on error */
123: movl $1,_ercode /* error code data miscompare */
124: movl negval,_actual /* actual data */
125: movl $ZERO,_expected /* expected data */
126: jmp *badrtn
127: 1: cmpl $ZERO,zero /* compare source to 0 */
128: jneq error3 /* error if value changed */
129: jeql aldn
130: bbs $0,_scoplp,0b /* if set scope loop on error */
131: movl $3,_ercode /* error code operand miscompare */
132: movl zero,_actual /* actual data */
133: movl $ZERO,_expected /* expected data */
134: jmp *badrtn
135:
136:
137:
138: aldn: bbs $0,_force_lp,0b /* if set loop on last subtest */
139: jmp *return
140:
141: /* test data */
142: .align 2
143: negval: .long NEGVAL
144: zero: .long 0
145: actpsl: .long 0
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.