1 # frv testcase for mcpxiu $GRi,$GRj,$GRk
4 .include "testutils.inc"
10 set_fr_iimmed 4,2,fr7 ; multiply small numbers
13 test_accg_immed 0,accg0
14 test_acc_immed 26,acc0
16 set_fr_iimmed 1,2,fr7 ; multiply by 1
19 test_accg_immed 0,accg0
22 set_fr_iimmed 0,2,fr7 ; multiply by 0
25 test_accg_immed 0,accg0
28 set_fr_iimmed 0x3fff,1,fr7 ; 15 bit result
29 set_fr_iimmed 0x0001,2,fr8
31 test_accg_immed 0,accg0
32 test_acc_limmed 0x0000,0x7fff,acc0
34 set_fr_iimmed 0x4000,1,fr7 ; 16 bit result
35 set_fr_iimmed 0x0001,2,fr8
37 test_accg_immed 0,accg0
38 test_acc_limmed 0x0000,0x8001,acc0
40 set_fr_iimmed 0x4000,1,fr7 ; 17 bit result
41 set_fr_iimmed 0x0001,4,fr8
43 test_accg_immed 0,accg0
44 test_acc_immed 0x00010001,acc0
46 set_fr_iimmed 0x7fff,0x0000,fr7 ; max positive result
47 set_fr_iimmed 0x7fff,0x7fff,fr8
49 test_accg_immed 0,accg0
50 test_acc_immed 0x3fff0001,acc0
52 set_fr_iimmed 0x8000,0x8000,fr7 ; max positive result
53 set_fr_iimmed 0x0000,0x8000,fr8
55 test_accg_immed 0,accg0
56 test_acc_limmed 0x4000,0x0000,acc0
58 set_fr_iimmed 0xffff,0x0000,fr7 ; max positive result
59 set_fr_iimmed 0xffff,0xffff,fr8
61 test_accg_immed 0,accg0
62 test_acc_limmed 0xfffe,0x0001,acc0
64 set_fr_iimmed 0xfffe,0xffff,fr7 ; almost max positive result
65 set_fr_iimmed 0xffff,0xffff,fr8
67 test_accg_immed 1,accg0
68 test_acc_immed 0xfffb0003,acc0
70 set_fr_iimmed 0xffff,0xffff,fr7 ; max positive result
71 set_fr_iimmed 0xffff,0xffff,fr8
73 test_accg_immed 1,accg0
74 test_acc_immed 0xfffc0002,acc0