Home | History | Annotate | Line # | Download | only in bfin
byteop3p.s revision 1.1
      1  1.1  christos # Blackfin testcase for BYTEOP3P
      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 res:req
      9  1.1  christos 	imm32 R7, \res
     10  1.1  christos 	CC = R6 == R7;
     11  1.1  christos 	IF !CC JUMP 1f;
     12  1.1  christos 	.endm
     13  1.1  christos 	.macro test_byteop3p i0:req, i1:req, resL:req, resH:req, resLR:req, resHR:req
     14  1.1  christos 	dmm32 I0, \i0
     15  1.1  christos 	dmm32 I1, \i1
     16  1.1  christos 
     17  1.1  christos 	R6 = BYTEOP3P (R1:0, R3:2) (LO);
     18  1.1  christos 	check_it \resL
     19  1.1  christos 	R6 = BYTEOP3P (R1:0, R3:2) (HI);
     20  1.1  christos 	check_it \resH
     21  1.1  christos 	R6 = BYTEOP3P (R1:0, R3:2) (LO, R);
     22  1.1  christos 	check_it \resLR
     23  1.1  christos 	R6 = BYTEOP3P (R1:0, R3:2) (HI, R);
     24  1.1  christos 	check_it \resHR
     25  1.1  christos 
     26  1.1  christos 	jump 2f;
     27  1.1  christos 1:	fail
     28  1.1  christos 2:
     29  1.1  christos 	.endm
     30  1.1  christos 
     31  1.1  christos 	imm32 R0, 0x01020304
     32  1.1  christos 	imm32 R1, 0x10203040
     33  1.1  christos 	imm32 R2, 0x0a0b0c0d
     34  1.1  christos 	imm32 R3, 0xa0b0c0d0
     35  1.1  christos 
     36  1.1  christos 	test_byteop3p 0, 0, 0x00ff00ff, 0xff00ff00, 0x00ff00ff, 0xff00ff00
     37  1.1  christos 	test_byteop3p 0, 1, 0x00ff00ff, 0xff00ff00, 0x00ff00ff, 0xff00ff00
     38  1.1  christos 	test_byteop3p 0, 2, 0x00ff00ff, 0xff00ff00, 0x00ff00ff, 0xff00ff00
     39  1.1  christos 	test_byteop3p 0, 3, 0x00ff00ff, 0xff00ff00, 0x00ff00ff, 0xff00ff00
     40  1.1  christos 	test_byteop3p 1, 0, 0x00ff00ff, 0xff00ff00, 0x00ff00ff, 0xff00ff00
     41  1.1  christos 	test_byteop3p 1, 1, 0x00ff00ff, 0xff00ff00, 0x00ff00ff, 0xff00ff00
     42  1.1  christos 	test_byteop3p 1, 2, 0x00ff00ff, 0xff00ff00, 0x00ff00ff, 0xff00ff00
     43  1.1  christos 	test_byteop3p 1, 3, 0x00ff00ff, 0xff00ff00, 0x00ff00ff, 0xff00ff00
     44  1.1  christos 	test_byteop3p 2, 0, 0x00ff00ff, 0xff00ff00, 0x00ff00ff, 0xff00ff00
     45  1.1  christos 	test_byteop3p 2, 1, 0x00ff00ff, 0xff00ff00, 0x00ff00ff, 0xff00ff00
     46  1.1  christos 	test_byteop3p 2, 2, 0x00ff00ff, 0xff00ff00, 0x00ff00ff, 0xff00ff00
     47  1.1  christos 	test_byteop3p 2, 3, 0x00ff00ff, 0xff00ff00, 0x00ff00ff, 0xff00ff00
     48  1.1  christos 	test_byteop3p 3, 0, 0x00ff00ff, 0xff00ff00, 0x00ff00ff, 0xff00ff00
     49  1.1  christos 	test_byteop3p 3, 1, 0x00ff00ff, 0xff00ff00, 0x00ff00ff, 0xff00ff00
     50  1.1  christos 	test_byteop3p 3, 2, 0x00ff00ff, 0xff00ff00, 0x00ff00ff, 0xff00ff00
     51  1.1  christos 	test_byteop3p 3, 3, 0x00ff00ff, 0xff00ff00, 0x00ff00ff, 0xff00ff00
     52  1.1  christos 
     53  1.1  christos 	imm32 R0, ~0x01020304
     54  1.1  christos 	imm32 R1, ~0x10203040
     55  1.1  christos 	imm32 R2, ~0x0a0b0c0d
     56  1.1  christos 	imm32 R3, ~0xa0b0c0d0
     57  1.1  christos 
     58  1.1  christos 	test_byteop3p 0, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000
     59  1.1  christos 	test_byteop3p 0, 1, 0x00000000, 0x00000000, 0x00000000, 0x00000000
     60  1.1  christos 	test_byteop3p 0, 2, 0x00000000, 0x00000000, 0x00000000, 0x00000000
     61  1.1  christos 	test_byteop3p 0, 3, 0x00000000, 0x00000000, 0x00000000, 0x00000000
     62  1.1  christos 	test_byteop3p 1, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000
     63  1.1  christos 	test_byteop3p 1, 1, 0x00000000, 0x00000000, 0x00000000, 0x00000000
     64  1.1  christos 	test_byteop3p 1, 2, 0x00000000, 0x00000000, 0x00000000, 0x00000000
     65  1.1  christos 	test_byteop3p 1, 3, 0x00000000, 0x00000000, 0x00000000, 0x00000000
     66  1.1  christos 	test_byteop3p 2, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000
     67  1.1  christos 	test_byteop3p 2, 1, 0x00000000, 0x00000000, 0x00000000, 0x00000000
     68  1.1  christos 	test_byteop3p 2, 2, 0x00000000, 0x00000000, 0x00000000, 0x00000000
     69  1.1  christos 	test_byteop3p 2, 3, 0x00000000, 0x00000000, 0x00000000, 0x00000000
     70  1.1  christos 	test_byteop3p 3, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000
     71  1.1  christos 	test_byteop3p 3, 1, 0x00000000, 0x00000000, 0x00000000, 0x00000000
     72  1.1  christos 	test_byteop3p 3, 2, 0x00000000, 0x00000000, 0x00000000, 0x00000000
     73  1.1  christos 	test_byteop3p 3, 3, 0x00000000, 0x00000000, 0x00000000, 0x00000000
     74  1.1  christos 
     75  1.1  christos 	imm32 R0, 0x00010002
     76  1.1  christos 	imm32 R1, 0x00030004
     77  1.1  christos 	imm32 R2, 0x10203040
     78  1.1  christos 	imm32 R3, 0x50607080
     79  1.1  christos 
     80  1.1  christos 	test_byteop3p 0, 0, 0x00110032, 0x21004200, 0x00530074, 0x63008400
     81  1.1  christos 	test_byteop3p 0, 1, 0x00810022, 0x11003200, 0x00430064, 0x53007400
     82  1.1  christos 	test_byteop3p 0, 2, 0x00710012, 0x81002200, 0x00330054, 0x43006400
     83  1.1  christos 	test_byteop3p 0, 3, 0x00610082, 0x71001200, 0x00230044, 0x33005400
     84  1.1  christos 	test_byteop3p 1, 0, 0x00ff00ff, 0xff00ff00, 0x00ff00ff, 0xff00ff00
     85  1.1  christos 	test_byteop3p 1, 1, 0x00ff00ff, 0xff00ff00, 0x00ff00ff, 0xff00ff00
     86  1.1  christos 	test_byteop3p 1, 2, 0x00ff00ff, 0xff00ff00, 0x00ff00ff, 0xff00ff00
     87  1.1  christos 	test_byteop3p 1, 3, 0x00ff00ff, 0xff00ff00, 0x00ff00ff, 0xff00ff00
     88  1.1  christos 	test_byteop3p 2, 0, 0x00140031, 0x24004100, 0x00520073, 0x62008300
     89  1.1  christos 	test_byteop3p 2, 1, 0x00840021, 0x14003100, 0x00420063, 0x52007300
     90  1.1  christos 	test_byteop3p 2, 2, 0x00740011, 0x84002100, 0x00320053, 0x42006300
     91  1.1  christos 	test_byteop3p 2, 3, 0x00640081, 0x74001100, 0x00220043, 0x32005300
     92  1.1  christos 	test_byteop3p 3, 0, 0x00ff00ff, 0xff00ff00, 0x00ff00ff, 0xff00ff00
     93  1.1  christos 	test_byteop3p 3, 1, 0x00ff00ff, 0xff00ff00, 0x00ff00ff, 0xff00ff00
     94  1.1  christos 	test_byteop3p 3, 2, 0x00ff00ff, 0xff00ff00, 0x00ff00ff, 0xff00ff00
     95  1.1  christos 	test_byteop3p 3, 3, 0x00ff00ff, 0xff00ff00, 0x00ff00ff, 0xff00ff00
     96  1.1  christos 
     97  1.1  christos 	imm32 R0, 0x00100200
     98  1.1  christos 	imm32 R1, 0x30000040
     99  1.1  christos 	imm32 R2, 0x1a2b3c4d
    100  1.1  christos 	imm32 R3, 0x5e6f7a8b
    101  1.1  christos 
    102  1.1  christos 	test_byteop3p 0, 0, 0x002a00ff, 0x3b00ff00, 0x00ff00ba, 0xff00cb00
    103  1.1  christos 	test_byteop3p 0, 1, 0x009b00ff, 0x2a00ff00, 0x00ff00af, 0xff00ba00
    104  1.1  christos 	test_byteop3p 0, 2, 0x008a00ff, 0x9b00ff00, 0x00ff009e, 0xff00af00
    105  1.1  christos 	test_byteop3p 0, 3, 0x007f00ff, 0x8a00ff00, 0x00ff008d, 0xff009e00
    106  1.1  christos 	test_byteop3p 1, 0, 0x00ff00ff, 0xff00ff00, 0x008e007a, 0x9f008b00
    107  1.1  christos 	test_byteop3p 1, 1, 0x00ff00ff, 0xff00ff00, 0x007d006f, 0x8e007a00
    108  1.1  christos 	test_byteop3p 1, 2, 0x00ff00ff, 0xff00ff00, 0x006c005e, 0x7d006f00
    109  1.1  christos 	test_byteop3p 1, 3, 0x00ff00ff, 0xff00ff00, 0x005b004d, 0x6c005e00
    110  1.1  christos 	test_byteop3p 2, 0, 0x005a004c, 0x6b005d00, 0x00ff00ff, 0xff00ff00
    111  1.1  christos 	test_byteop3p 2, 1, 0x00cb003b, 0x5a004c00, 0x00ff00ff, 0xff00ff00
    112  1.1  christos 	test_byteop3p 2, 2, 0x00ba002a, 0xcb003b00, 0x00ff00ff, 0xff00ff00
    113  1.1  christos 	test_byteop3p 2, 3, 0x00af009b, 0xba002a00, 0x00ff00ff, 0xff00ff00
    114  1.1  christos 	test_byteop3p 3, 0, 0x001a00ff, 0x2b00ff00, 0x00ff00aa, 0xff00bb00
    115  1.1  christos 	test_byteop3p 3, 1, 0x008b00ff, 0x1a00ff00, 0x00ff009f, 0xff00aa00
    116  1.1  christos 	test_byteop3p 3, 2, 0x007a00ff, 0x8b00ff00, 0x00ff008e, 0xff009f00
    117  1.1  christos 	test_byteop3p 3, 3, 0x006f00ff, 0x7a00ff00, 0x00ff007d, 0xff008e00
    118  1.1  christos 
    119  1.1  christos 	pass
    120