binutils-gdb/sim/testsuite/frv/nfsqrts.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

36 lines
880 B
Plaintext

# frv testcase for nfsqrts $FRj,$FRk
# mach: fr500 fr550 frv
.include "testutils.inc"
float_constants
start
load_float_constants
.global nfsqrts
nfsqrts:
nfsqrts fr44,fr1 ; 9.0
test_fr_fr fr1,fr36 ; 3.0
test_spr_immed 0,fner1
test_spr_immed 0,fner0
set_fr_iimmed 0x4049,0x0fdb,fr10 ; 3.141592654
nfsqrts fr10,fr10
test_fr_iimmed 0x3fe2dfc5,fr10 ; 1.7724539
test_spr_immed 0,fner1
test_spr_immed 0,fner0
; fp_exceptions
nfsqrts fr8,fr1 ; -1 -- invalid
test_fr_iimmed 0x7fc00000,fr1 ; nan1
test_spr_immed 2,fner1
test_spr_immed 0,fner0
test_spr_bits 0x80000000,31,0x0,fqst0 ; fq0.miv is clear
test_spr_bits 0x18000,15,0x0,fqst0 ; fq0.sie is clear
test_spr_bits 0x380,7,0x0,fqst0 ; fq0.ftt is clear
test_spr_bits 0x7e,1,0x0,fqst0 ; fq0.cexc is clear
test_spr_bits 0x1,0,0x0,fqst0 ; fq0.valid is clear
test_spr_immed 0,fqop0 ; fq0.opc
pass