Home | History | Annotate | Line # | Download | only in bfin
m6.s revision 1.1
      1  1.1  christos //  Test result extraction of mac instructions.
      2  1.1  christos //  Test basic edge values
      3  1.1  christos //  SIGNED INTEGER  mode into SINGLE destination register
      4  1.1  christos //  test ops: "+="
      5  1.1  christos # mach: bfin
      6  1.1  christos 
      7  1.1  christos .include "testutils.inc"
      8  1.1  christos 	start
      9  1.1  christos 
     10  1.1  christos 
     11  1.1  christos // load r0=0x80000001
     12  1.1  christos // load r1=0x80007fff
     13  1.1  christos // load r2=0xf0000000
     14  1.1  christos // load r3=0x0000007f
     15  1.1  christos // load r4=0x00000080
     16  1.1  christos 	loadsym P0, data0;
     17  1.1  christos 	R0 = [ P0 ++ ];
     18  1.1  christos 	R1 = [ P0 ++ ];
     19  1.1  christos 	R2 = [ P0 ++ ];
     20  1.1  christos 	R3 = [ P0 ++ ];
     21  1.1  christos 	R4 = [ P0 ++ ];
     22  1.1  christos 
     23  1.1  christos // integer extraction with no saturation
     24  1.1  christos // 0x1 * 0x1 = 0x0000000001 -> 0x1
     25  1.1  christos 	A1 = A0 = 0;
     26  1.1  christos 	R5.H = (A1 += R0.L * R0.L), R5.L = (A0 += R0.L * R0.L) (IS);
     27  1.1  christos 	DBGA ( R5.L , 0x1 );
     28  1.1  christos 	DBGA ( R5.H , 0x1 );
     29  1.1  christos 
     30  1.1  christos // integer extraction with positive saturation
     31  1.1  christos // 0x7fff * 0x7f  -> 0x7fff
     32  1.1  christos 	A1 = A0 = 0;
     33  1.1  christos 	R5.H = (A1 += R1.L * R3.L), R5.L = (A0 += R1.L * R3.L) (IS);
     34  1.1  christos 	DBGA ( R5.L , 0x7fff );
     35  1.1  christos 	DBGA ( R5.H , 0x7fff );
     36  1.1  christos 
     37  1.1  christos // integer extraction with negative saturation
     38  1.1  christos // 0x8000 * 0x7f  -> 0x8000
     39  1.1  christos 	A1 = A0 = 0;
     40  1.1  christos 	R5.H = (A1 += R1.H * R3.L), R5.L = (A0 += R1.H * R3.L) (IS);
     41  1.1  christos 	DBGA ( R5.L , 0x8000 );
     42  1.1  christos 	DBGA ( R5.H , 0x8000 );
     43  1.1  christos 
     44  1.1  christos 	pass
     45  1.1  christos 
     46  1.1  christos 	.data;
     47  1.1  christos data0:
     48  1.1  christos 	.dw 0x0001
     49  1.1  christos 	.dw 0x8000
     50  1.1  christos 	.dw 0x7fff
     51  1.1  christos 	.dw 0x8000
     52  1.1  christos 	.dw 0x0000
     53  1.1  christos 	.dw 0xf000
     54  1.1  christos 	.dw 0x007f
     55  1.1  christos 	.dw 0x0000
     56  1.1  christos 	.dw 0x0080
     57  1.1  christos 	.dw 0x0000
     58