1# mach: bfin 2 3.include "testutils.inc" 4 start 5 6 init_r_regs 0; 7 ASTAT = R0; 8 9 R0.L = 0x1234; 10 R0.H = 0x7765; 11 DBGA ( R0.L , 0x1234 ); 12 DBGA ( R0.H , 0x7765 ); 13 R0.L = -1; 14 DBGA ( R0.H , 0x7765 ); 15 DBGA ( R0.L , 0xffff ); 16 17 R0.L = 0x5555; 18 R0.H = 0xAAAA; 19 DBGA ( R0.H , 0xAAAA ); 20 DBGA ( R0.L , 0x5555 ); 21 22 I0.L = 0x1234; 23 I0.H = 0x256; 24 R0 = I0; 25 DBGA ( R0.L , 0x1234 ); 26 DBGA ( R0.H , 0x256 ); 27 28 R0 = -50; 29 R1 = -77 (X); 30 R2 = -99 (X); 31 R3 = 32767 (X); 32 R4 = -32768 (X); 33 R5 = 256 (X); 34 R6 = 128 (X); 35 R7 = 1023 (X); 36 DBGA ( R0.L , 0xffce ); 37 DBGA ( R1.L , 0xffb3 ); 38 DBGA ( R2.L , 0xff9d ); 39 DBGA ( R3.L , 0x7fff ); 40 DBGA ( R4.L , 0x8000 ); 41 DBGA ( R5.L , 256 ); 42 DBGA ( R6.L , 128 ); 43 DBGA ( R7.L , 1023 ); 44 45 R6 = -1; 46 DBGA ( R6.L , 0xffff ); 47 48 R0.L = 0x5555; 49 R1.L = 0xaaaa; 50 51 DBGA ( R0.L , 0x5555 ); 52 DBGA ( R1.L , 0xaaaa ); 53 54 R0 = R0 + R1; 55 DBGA ( R0.H , 0xfffe ); 56 57 pass 58