Home | History | Annotate | Line # | Download | only in iwmmxt
      1  1.1  christos # Intel(r) Wireless MMX(tm) technology testcase for WSAD
      2  1.1  christos # mach: xscale
      3  1.1  christos # as: -mcpu=xscale+iwmmxt
      4  1.1  christos 
      5  1.1  christos 	.include "testutils.inc"
      6  1.1  christos 
      7  1.1  christos 	start
      8  1.1  christos 
      9  1.1  christos 	.global wsad
     10  1.1  christos wsad:
     11  1.1  christos 	# Enable access to CoProcessors 0 & 1 before
     12  1.1  christos         # we attempt these instructions.
     13  1.1  christos 
     14  1.1  christos 	mvi_h_gr   r1, 3
     15  1.1  christos 	mcr        p15, 0, r1, cr15, cr1, 0
     16  1.1  christos 
     17  1.1  christos 	# Test Byte wide absolute accumulation
     18  1.1  christos 	
     19  1.1  christos 	mvi_h_gr   r0, 0x12345678
     20  1.1  christos 	mvi_h_gr   r1, 0x9abcdef0
     21  1.1  christos 	mvi_h_gr   r2, 0x11111111
     22  1.1  christos 	mvi_h_gr   r3, 0x22222222
     23  1.1  christos 	mvi_h_gr   r4, 0x22222222
     24  1.1  christos 	mvi_h_gr   r5, 0x22222222
     25  1.1  christos 
     26  1.1  christos 	tmcrr	   wr0, r0, r1
     27  1.1  christos 	tmcrr	   wr1, r2, r3
     28  1.1  christos 	tmcrr	   wr2, r4, r5
     29  1.1  christos 
     30  1.1  christos 	wsadb	   wr2, wr0, wr1
     31  1.1  christos 	
     32  1.1  christos 	tmrrc	   r0, r1, wr0
     33  1.1  christos 	tmrrc	   r2, r3, wr1
     34  1.1  christos 	tmrrc	   r4, r5, wr2
     35  1.1  christos 	
     36  1.1  christos 	test_h_gr  r0, 0x12345678
     37  1.1  christos 	test_h_gr  r1, 0x9abcdef0
     38  1.1  christos 	test_h_gr  r2, 0x11111111
     39  1.1  christos 	test_h_gr  r3, 0x22222222
     40  1.1  christos 	test_h_gr  r4, 0x2222258e
     41  1.1  christos 	test_h_gr  r5, 0x00000000
     42  1.1  christos 	
     43  1.1  christos 	# Test Byte wide absolute accumulation with zeroing
     44  1.1  christos 	
     45  1.1  christos 	mvi_h_gr   r0, 0x12345678
     46  1.1  christos 	mvi_h_gr   r1, 0x9abcdef0
     47  1.1  christos 	mvi_h_gr   r2, 0x11111111
     48  1.1  christos 	mvi_h_gr   r3, 0x22222222
     49  1.1  christos 	mvi_h_gr   r4, 0x22222222
     50  1.1  christos 	mvi_h_gr   r5, 0x22222222
     51  1.1  christos 
     52  1.1  christos 	tmcrr	   wr0, r0, r1
     53  1.1  christos 	tmcrr	   wr1, r2, r3
     54  1.1  christos 	tmcrr	   wr2, r4, r5
     55  1.1  christos 
     56  1.1  christos 	wsadbz	   wr2, wr0, wr1
     57  1.1  christos 	
     58  1.1  christos 	tmrrc	   r0, r1, wr0
     59  1.1  christos 	tmrrc	   r2, r3, wr1
     60  1.1  christos 	tmrrc	   r4, r5, wr2
     61  1.1  christos 	
     62  1.1  christos 	test_h_gr  r0, 0x12345678
     63  1.1  christos 	test_h_gr  r1, 0x9abcdef0
     64  1.1  christos 	test_h_gr  r2, 0x11111111
     65  1.1  christos 	test_h_gr  r3, 0x22222222
     66  1.1  christos 	test_h_gr  r4, 0x0000036c
     67  1.1  christos 	test_h_gr  r5, 0x00000000
     68  1.1  christos 	
     69  1.1  christos 	# Test Halfword wide absolute accumulation
     70  1.1  christos 	
     71  1.1  christos 	mvi_h_gr   r0, 0x12345678
     72  1.1  christos 	mvi_h_gr   r1, 0x9abcdef0
     73  1.1  christos 	mvi_h_gr   r2, 0x11111111
     74  1.1  christos 	mvi_h_gr   r3, 0x22222222
     75  1.1  christos 	mvi_h_gr   r4, 0x22222222
     76  1.1  christos 	mvi_h_gr   r5, 0x22222222
     77  1.1  christos 
     78  1.1  christos 	tmcrr	   wr0, r0, r1
     79  1.1  christos 	tmcrr	   wr1, r2, r3
     80  1.1  christos 	tmcrr	   wr2, r4, r5
     81  1.1  christos 
     82  1.1  christos 	wsadh	   wr2, wr0, wr1
     83  1.1  christos 	
     84  1.1  christos 	tmrrc	   r0, r1, wr0
     85  1.1  christos 	tmrrc	   r2, r3, wr1
     86  1.1  christos 	tmrrc	   r4, r5, wr2
     87  1.1  christos 	
     88  1.1  christos 	test_h_gr  r0, 0x12345678
     89  1.1  christos 	test_h_gr  r1, 0x9abcdef0
     90  1.1  christos 	test_h_gr  r2, 0x11111111
     91  1.1  christos 	test_h_gr  r3, 0x22222222
     92  1.1  christos 	test_h_gr  r4, 0x22239e14
     93  1.1  christos 	test_h_gr  r5, 0x00000000
     94  1.1  christos 	
     95  1.1  christos 	# Test Halfword wide absolute accumulation with zeroing
     96  1.1  christos 	
     97  1.1  christos 	mvi_h_gr   r0, 0x12345678
     98  1.1  christos 	mvi_h_gr   r1, 0x9abcdef0
     99  1.1  christos 	mvi_h_gr   r2, 0x11111111
    100  1.1  christos 	mvi_h_gr   r3, 0x22222222
    101  1.1  christos 	mvi_h_gr   r4, 0x22222222
    102  1.1  christos 	mvi_h_gr   r5, 0x22222222
    103  1.1  christos 
    104  1.1  christos 	tmcrr	   wr0, r0, r1
    105  1.1  christos 	tmcrr	   wr1, r2, r3
    106  1.1  christos 	tmcrr	   wr2, r4, r5
    107  1.1  christos 
    108  1.1  christos 	wsadhz	   wr2, wr0, wr1
    109  1.1  christos 	
    110  1.1  christos 	tmrrc	   r0, r1, wr0
    111  1.1  christos 	tmrrc	   r2, r3, wr1
    112  1.1  christos 	tmrrc	   r4, r5, wr2
    113  1.1  christos 	
    114  1.1  christos 	test_h_gr  r0, 0x12345678
    115  1.1  christos 	test_h_gr  r1, 0x9abcdef0
    116  1.1  christos 	test_h_gr  r2, 0x11111111
    117  1.1  christos 	test_h_gr  r3, 0x22222222
    118  1.1  christos 	test_h_gr  r4, 0x00017bf2
    119  1.1  christos 	test_h_gr  r5, 0x00000000
    120  1.1  christos 
    121  1.1  christos 	pass
    122