m16.s revision 1.1 1 1.1 christos // Test various moves to single register half
2 1.1 christos # mach: bfin
3 1.1 christos
4 1.1 christos .include "testutils.inc"
5 1.1 christos start
6 1.1 christos
7 1.1 christos
8 1.1 christos // load r0=0x7fffffff
9 1.1 christos // load r1=0x00ffffff
10 1.1 christos // load r2=0xf0000000
11 1.1 christos // load r3=0x0000007f
12 1.1 christos // load r4=0x00000080
13 1.1 christos loadsym P0, data0;
14 1.1 christos R0 = [ P0 ++ ];
15 1.1 christos R1 = [ P0 ++ ];
16 1.1 christos R2 = [ P0 ++ ];
17 1.1 christos R3 = [ P0 ++ ];
18 1.1 christos R4 = [ P0 ++ ];
19 1.1 christos
20 1.1 christos // extract only to high half
21 1.1 christos R5 = 0;
22 1.1 christos A1 = A0 = 0;
23 1.1 christos A1.w = R0;
24 1.1 christos A0.w = R0;
25 1.1 christos R5.H = A1;
26 1.1 christos DBGA ( R5.L , 0x0000 );
27 1.1 christos DBGA ( R5.H , 0x7fff );
28 1.1 christos
29 1.1 christos // extract only to low half
30 1.1 christos R5 = 0;
31 1.1 christos A1 = A0 = 0;
32 1.1 christos A1.w = R0;
33 1.1 christos A0.w = R0;
34 1.1 christos R5.L = A0;
35 1.1 christos DBGA ( R5.L , 0x7fff );
36 1.1 christos DBGA ( R5.H , 0x0000 );
37 1.1 christos
38 1.1 christos // extract only to high half
39 1.1 christos R5 = 0;
40 1.1 christos A1 = A0 = 0;
41 1.1 christos R5.H = ( A1 += R0.H * R0.H ), A0 += R0.H * R0.H;
42 1.1 christos DBGA ( R5.L , 0x0000 );
43 1.1 christos DBGA ( R5.H , 0x7ffe );
44 1.1 christos
45 1.1 christos // extract only to low half
46 1.1 christos R5 = 0;
47 1.1 christos A1 = A0 = 0;
48 1.1 christos A1 += R0.H * R0.H, R5.L = ( A0 += R0.H * R0.H );
49 1.1 christos DBGA ( R5.L , 0x7ffe );
50 1.1 christos DBGA ( R5.H , 0x0000 );
51 1.1 christos
52 1.1 christos pass
53 1.1 christos
54 1.1 christos .data
55 1.1 christos data0:
56 1.1 christos .dw 0xffff
57 1.1 christos .dw 0x7fff
58 1.1 christos .dw 0xffff
59 1.1 christos .dw 0x00ff
60 1.1 christos .dw 0x0000
61 1.1 christos .dw 0xf000
62 1.1 christos .dw 0x007f
63 1.1 christos .dw 0x0000
64 1.1 christos .dw 0x0080
65 1.1 christos .dw 0x0000
66