New sim testsuite for Fujitsu FRV. Contributed by Red Hat.
[external/binutils.git] / sim / testsuite / sim / frv / stbfi.cgs
1 # frv testcase for stbfi $FRk,@($GRi,$GRj)
2 # mach: all
3
4         .include "testutils.inc"
5
6         start
7
8         .global stbfi
9 stbfi:
10         set_gr_gr       sp,gr20
11         set_mem_limmed  0xdead,0xbeef,sp
12         set_fr_iimmed   0xffff,0xffff,fr8
13         stbfi           fr8,@(sp,0)
14         test_mem_limmed 0xffad,0xbeef,sp
15
16         inc_gr_immed    0x801,sp        ; 2049
17         stbfi           fr8,@(sp,-2048)
18         test_mem_limmed 0xffff,0xbeef,gr20
19
20         inc_gr_immed    -4094,sp
21         stbfi           fr8,@(sp,0x7ff)
22         test_mem_limmed 0xffff,0xffef,gr20
23
24         pass