2
0
mirror of https://sourceware.org/git/binutils-gdb.git synced 2024-12-21 04:42:53 +08:00
binutils-gdb/sim/testsuite/frv/cudiv.cgs
Mike Frysinger 1368b914e9 sim: testsuite: flatten tree
Now that all port tests live under testsuite/sim/*/, and none live
in testsuite/ directly, flatten the structure by moving all of the
dirs under testsuite/sim/ to testsuite/ directly.

We need to stop passing --tool to dejagnu so that it searches all
dirs and not just ones that start with "sim".  Since we have no
other dirs in this tree, and no plans to add any, should be fine.
2021-01-15 19:18:34 -05:00

97 lines
2.5 KiB
Plaintext

# frv testcase for cudiv $GRi,$GRj,$GRk,$CCi,$cond
# mach: all
.include "testutils.inc"
start
.global cudiv
cudiv:
set_spr_immed 0x1b1b,cccr
; simple division 12 / 3
set_gr_immed 0x00000003,gr2
set_gr_immed 0x0000000c,gr3
cudiv gr3,gr2,gr3,cc0,1
test_gr_immed 0x00000003,gr2
test_gr_immed 0x00000004,gr3
; example 1 from division in the fr30 manual
set_gr_limmed 0x0123,0x4567,gr2
set_gr_limmed 0xfedc,0xba98,gr3
cudiv gr3,gr2,gr3,cc4,1
test_gr_limmed 0x0123,0x4567,gr2
test_gr_immed 0x000000e0,gr3
; simple division 12 / 3
set_gr_immed 0x00000003,gr2
set_gr_immed 0x0000000c,gr3
cudiv gr3,gr2,gr3,cc0,0
test_gr_immed 0x00000003,gr2
test_gr_immed 0x0000000c,gr3
; example 1 from division in the fr30 manual
set_gr_limmed 0x0123,0x4567,gr2
set_gr_limmed 0xfedc,0xba98,gr3
cudiv gr3,gr2,gr3,cc4,0
test_gr_limmed 0x0123,0x4567,gr2
test_gr_limmed 0xfedc,0xba98,gr3
; simple division 12 / 3
set_gr_immed 0x00000003,gr2
set_gr_immed 0x0000000c,gr3
cudiv gr3,gr2,gr3,cc1,0
test_gr_immed 0x00000003,gr2
test_gr_immed 0x00000004,gr3
; example 1 from division in the fr30 manual
set_gr_limmed 0x0123,0x4567,gr2
set_gr_limmed 0xfedc,0xba98,gr3
cudiv gr3,gr2,gr3,cc5,0
test_gr_limmed 0x0123,0x4567,gr2
test_gr_immed 0x000000e0,gr3
; simple division 12 / 3
set_gr_immed 0x00000003,gr2
set_gr_immed 0x0000000c,gr3
cudiv gr3,gr2,gr3,cc1,1
test_gr_immed 0x00000003,gr2
test_gr_immed 0x0000000c,gr3
; example 1 from division in the fr30 manual
set_gr_limmed 0x0123,0x4567,gr2
set_gr_limmed 0xfedc,0xba98,gr3
cudiv gr3,gr2,gr3,cc5,1
test_gr_limmed 0x0123,0x4567,gr2
test_gr_limmed 0xfedc,0xba98,gr3
; simple division 12 / 3
set_gr_immed 0x00000003,gr2
set_gr_immed 0x0000000c,gr3
cudiv gr3,gr2,gr3,cc2,0
test_gr_immed 0x00000003,gr2
test_gr_immed 0x0000000c,gr3
; example 1 from division in the fr30 manual
set_gr_limmed 0x0123,0x4567,gr2
set_gr_limmed 0xfedc,0xba98,gr3
cudiv gr3,gr2,gr3,cc6,1
test_gr_limmed 0x0123,0x4567,gr2
test_gr_limmed 0xfedc,0xba98,gr3
; simple division 12 / 3
set_gr_immed 0x00000003,gr2
set_gr_immed 0x0000000c,gr3
cudiv gr3,gr2,gr3,cc3,0
test_gr_immed 0x00000003,gr2
test_gr_immed 0x0000000c,gr3
; example 1 from division in the fr30 manual
set_gr_limmed 0x0123,0x4567,gr2
set_gr_limmed 0xfedc,0xba98,gr3
cudiv gr3,gr2,gr3,cc7,1
test_gr_limmed 0x0123,0x4567,gr2
test_gr_limmed 0xfedc,0xba98,gr3
pass