Home | History | Annotate | Line # | Download | only in bfin
      1  1.1  christos # Blackfin testcase for BYTEOP16P
      2  1.1  christos # mach: bfin
      3  1.1  christos 
      4  1.1  christos 	.include "testutils.inc"
      5  1.1  christos 
      6  1.1  christos 	start
      7  1.1  christos 
      8  1.1  christos 	.macro check_it resL:req, resH:req
      9  1.1  christos 	imm32 R6, \resL
     10  1.1  christos 	CC = R4 == R6;
     11  1.1  christos 	IF !CC JUMP 1f;
     12  1.1  christos 	imm32 R7, \resH
     13  1.1  christos 	CC = R5 == R7;
     14  1.1  christos 	IF !CC JUMP 1f;
     15  1.1  christos 	.endm
     16  1.1  christos 	.macro test_byteop16p i0:req, i1:req, resL:req, resH:req, resLR:req, resHR:req
     17  1.1  christos 	dmm32 I0, \i0
     18  1.1  christos 	dmm32 I1, \i1
     19  1.1  christos 
     20  1.1  christos 	(R4, R5) = BYTEOP16P (R1:0, R3:2);
     21  1.1  christos 	check_it \resL, \resH
     22  1.1  christos 	(R4, R5) = BYTEOP16P (R1:0, R3:2) (R);
     23  1.1  christos 	check_it \resLR, \resHR
     24  1.1  christos 
     25  1.1  christos 	jump 2f;
     26  1.1  christos 1:	fail
     27  1.1  christos 2:
     28  1.1  christos 	.endm
     29  1.1  christos 
     30  1.1  christos 	imm32 R0, 0x01020304
     31  1.1  christos 	imm32 R1, 0x10203040
     32  1.1  christos 	imm32 R2, 0x0a0b0c0d
     33  1.1  christos 	imm32 R3, 0xa0b0c0d0
     34  1.1  christos 
     35  1.1  christos 	test_byteop16p 0, 0, 0x000b000d, 0x000f0011, 0x00b000d0, 0x00f00110
     36  1.1  christos 	test_byteop16p 0, 1, 0x00d1000c, 0x000e0010, 0x001d00c0, 0x00e00100
     37  1.1  christos 	test_byteop16p 0, 2, 0x00c100d2, 0x000d000f, 0x001c002d, 0x00d000f0
     38  1.1  christos 	test_byteop16p 0, 3, 0x00b100c2, 0x00d3000e, 0x001b002c, 0x003d00e0
     39  1.1  christos 	test_byteop16p 1, 0, 0x004a000c, 0x000e0010, 0x00a400c0, 0x00e00100
     40  1.1  christos 	test_byteop16p 1, 1, 0x0110000b, 0x000d000f, 0x001100b0, 0x00d000f0
     41  1.1  christos 	test_byteop16p 1, 2, 0x010000d1, 0x000c000e, 0x0010001d, 0x00c000e0
     42  1.1  christos 	test_byteop16p 1, 3, 0x00f000c1, 0x00d2000d, 0x000f001c, 0x002d00d0
     43  1.1  christos 	test_byteop16p 2, 0, 0x003a004b, 0x000d000f, 0x00a300b4, 0x00d000f0
     44  1.1  christos 	test_byteop16p 2, 1, 0x0100004a, 0x000c000e, 0x001000a4, 0x00c000e0
     45  1.1  christos 	test_byteop16p 2, 2, 0x00f00110, 0x000b000d, 0x000f0011, 0x00b000d0
     46  1.1  christos 	test_byteop16p 2, 3, 0x00e00100, 0x00d1000c, 0x000e0010, 0x001d00c0
     47  1.1  christos 	test_byteop16p 3, 0, 0x002a003b, 0x004c000e, 0x00a200b3, 0x00c400e0
     48  1.1  christos 	test_byteop16p 3, 1, 0x00f0003a, 0x004b000d, 0x000f00a3, 0x00b400d0
     49  1.1  christos 	test_byteop16p 3, 2, 0x00e00100, 0x004a000c, 0x000e0010, 0x00a400c0
     50  1.1  christos 	test_byteop16p 3, 3, 0x00d000f0, 0x0110000b, 0x000d000f, 0x001100b0
     51  1.1  christos 
     52  1.1  christos 	imm32 R0, ~0x01020304
     53  1.1  christos 	imm32 R1, ~0x10203040
     54  1.1  christos 	imm32 R2, ~0x0a0b0c0d
     55  1.1  christos 	imm32 R3, ~0xa0b0c0d0
     56  1.1  christos 
     57  1.1  christos 	test_byteop16p 0, 0, 0x01f301f1, 0x01ef01ed, 0x014e012e, 0x010e00ee
     58  1.1  christos 	test_byteop16p 0, 1, 0x012d01f2, 0x01f001ee, 0x01e1013e, 0x011e00fe
     59  1.1  christos 	test_byteop16p 0, 2, 0x013d012c, 0x01f101ef, 0x01e201d1, 0x012e010e
     60  1.1  christos 	test_byteop16p 0, 3, 0x014d013c, 0x012b01f0, 0x01e301d2, 0x01c1011e
     61  1.1  christos 	test_byteop16p 1, 0, 0x01b401f2, 0x01f001ee, 0x015a013e, 0x011e00fe
     62  1.1  christos 	test_byteop16p 1, 1, 0x00ee01f3, 0x01f101ef, 0x01ed014e, 0x012e010e
     63  1.1  christos 	test_byteop16p 1, 2, 0x00fe012d, 0x01f201f0, 0x01ee01e1, 0x013e011e
     64  1.1  christos 	test_byteop16p 1, 3, 0x010e013d, 0x012c01f1, 0x01ef01e2, 0x01d1012e
     65  1.1  christos 	test_byteop16p 2, 0, 0x01c401b3, 0x01f101ef, 0x015b014a, 0x012e010e
     66  1.1  christos 	test_byteop16p 2, 1, 0x00fe01b4, 0x01f201f0, 0x01ee015a, 0x013e011e
     67  1.1  christos 	test_byteop16p 2, 2, 0x010e00ee, 0x01f301f1, 0x01ef01ed, 0x014e012e
     68  1.1  christos 	test_byteop16p 2, 3, 0x011e00fe, 0x012d01f2, 0x01f001ee, 0x01e1013e
     69  1.1  christos 	test_byteop16p 3, 0, 0x01d401c3, 0x01b201f0, 0x015c014b, 0x013a011e
     70  1.1  christos 	test_byteop16p 3, 1, 0x010e01c4, 0x01b301f1, 0x01ef015b, 0x014a012e
     71  1.1  christos 	test_byteop16p 3, 2, 0x011e00fe, 0x01b401f2, 0x01f001ee, 0x015a013e
     72  1.1  christos 	test_byteop16p 3, 3, 0x012e010e, 0x00ee01f3, 0x01f101ef, 0x01ed014e
     73  1.1  christos 
     74  1.1  christos 	pass
     75