1# mach: bfin 2 3.include "testutils.inc" 4 start 5 6// load r1=0x7fffffff 7// load r2=0x80000000 8// load r3=0x000000ff 9// load r4=0x00000000 10 loadsym p0, data0; 11 R0 = [ P0 ++ ]; 12 R1 = [ P0 ++ ]; 13 R2 = [ P0 ++ ]; 14 R3 = [ P0 ++ ]; 15 R4 = [ P0 ++ ]; 16 17 _dbg r0; 18 _dbg r1; 19 _dbg r2; 20 _dbg r3; 21 _dbg r4; 22 23 R7 = 0; 24 ASTAT = R7; 25 r5 = r1 << 0x4 (s); 26 _DBG ASTAT; 27 r7=astat; 28 dbga (r5.h, 0x7fff); 29 dbga (r5.l, 0xffff); 30 dbga (r7.h, 0x0300); // V=1, VS=1 31 dbga (r7.l, 0x8); 32 33 R7 = 0; 34 ASTAT = R7; 35 r5.h = r1.h << 0x4 (s); 36 _DBG ASTAT; 37 r7=astat; 38 dbga (r5.h, 0x7fff); 39 dbga (r7.h, 0x0300); // V=1, VS=1 40 dbga (r7.l, 0x8); 41 42 A0 = 0; 43 A0.w = r1; 44 A0.x = r0.l; 45 r6 = 0x3; 46 _dbg r6; 47 _dbg A0; 48 R7 = 0; 49 ASTAT = R7; 50 A0 = ASHIFT A0 BY R6.L; 51 _DBG ASTAT; 52 _DBG A0; 53 r7 = astat; 54 dbga (r7.h, 0x0); // AV0=0, AV0S=0 55 dbga (r7.l, 0x2); // AN = 1 56 57 A1 = 0; 58 A1 = r1; 59 A1.x = r0.l; 60 r6 = 0x3; 61 _dbg A1; 62 R7 = 0; 63 ASTAT = R7; 64 A1 = ASHIFT A1 BY R6.L; 65 _DBG ASTAT; 66 _DBG A1; 67 r7 = astat; 68 dbga (r7.h, 0x0); // AV1=0, AV1S=0 69 dbga (r7.l, 0x2); // AN = 1 70 71 pass 72 73 .data 0x1000; 74data0: 75 .dw 0x1111 76 .dw 0x1111 77 .dw 0xffff 78 .dw 0x7fff 79 .dw 0x0000 80 .dw 0x8000 81 .dw 0x00ff 82 .dw 0x0000 83 .dw 0x0000 84 .dw 0x0000 85