RISC-V: Cleanup the imply code and test cases for vendor xsf extensions.
[binutils-gdb.git] / sim / testsuite / frv / mcpli.cgs
blobb63ec67a7331b65bdc6439cbe8364fe6241b57f9
1 # frv testcase for mcpli $FRi,$s6,$FRk
2 # mach: fr400 fr550
4         .include "testutils.inc"
6         start
8         .global mcpli
9 mcpli:
10         set_fr_iimmed   0xdead,0xbeef,fr8
11         set_fr_iimmed   0xbeef,0xdead,fr9
12         set_fr_iimmed   0x1234,0x5678,fr10
13         mcpli           fr8,0x0,fr10    ; Shift by 0
14         test_fr_iimmed  0xdeadbeef,fr10
16         set_fr_iimmed   0x1234,0x5678,fr10
17         mcpli           fr8,0x1,fr10    ; Shift by 1
18         test_fr_iimmed  0xbd5b7ddf,fr10
20         set_fr_iimmed   0x1234,0x5678,fr10
21         mcpli           fr8,0x4,fr10    ; Shift by 4
22         test_fr_iimmed  0xeadbeefd,fr10
24         set_fr_iimmed   0x1234,0x5678,fr10
25         mcpli           fr8,0xc,fr10    ; Shift by 12
26         test_fr_iimmed  0xdbeefead,fr10
28         set_fr_iimmed   0x1234,0x5678,fr10
29         mcpli           fr8,0x1c,fr10   ; Shift by 28
30         test_fr_iimmed  0xfeefdead,fr10
32         set_fr_iimmed   0x1234,0x5678,fr10
33         mcpli           fr8,0x1f,fr10   ; Shift by 31
34         test_fr_iimmed  0xbeefdead,fr10
36         ; test again with truncated shift values
37         set_fr_iimmed   0x1234,0x5678,fr10
38         mcpli           fr8,0x20,fr10   ; Shift by 0
39         test_fr_iimmed  0xdeadbeef,fr10
41         set_fr_iimmed   0x1234,0x5678,fr10
42         mcpli           fr8,0x21,fr10   ; Shift by 1
43         test_fr_iimmed  0xbd5b7ddf,fr10
45         set_fr_iimmed   0x1234,0x5678,fr10
46         mcpli           fr8,0x24,fr10   ; Shift by 4
47         test_fr_iimmed  0xeadbeefd,fr10
49         set_fr_iimmed   0x1234,0x5678,fr10
50         mcpli           fr8,0x2c,fr10   ; Shift by 12
51         test_fr_iimmed  0xdbeefead,fr10
53         set_fr_iimmed   0x1234,0x5678,fr10
54         mcpli           fr8,0x3c,fr10   ; Shift by 28
55         test_fr_iimmed  0xfeefdead,fr10
57         set_fr_iimmed   0x1234,0x5678,fr10
58         mcpli           fr8,0x3f,fr10   ; Shift by 31
59         test_fr_iimmed  0xbeefdead,fr10
61         pass