1 # mips test sanity, expected to pass.
4 # ld: -N -Ttext=0x80010000
7 .include "testutils.inc"
9 .macro check_ps psval, upperval, lowerval
12 cvt.s.pu $
f0, \psval
# upper
13 cvt.s.pl $
f2, \psval
# lower
16 c.eq.s $fcc0
, $
f0, $
f4
18 c.eq.s $fcc0
, $
f2, $
f6
31 # make sure that Status.FR, .CU1, and .SBX are set.
33 or $
2, $
2, (1 << 26) |
(1 << 29) |
(1 << 16)
39 cvt.ps.s $
f20, $
f10, $
f12 # $f20: u=4.0, l=16.0
43 cvt.ps.s $
f22, $
f10, $
f12 # $f22: u=-1.0, l=2.0
48 div.ps $
f8, $
f20, $
f22
49 check_ps $
f8, -4.0, 8.0
55 check_ps $
f8, 0.25, 0.0625
61 check_ps $
f8, 0.5, 0.25
67 check_ps $
f8, 2.0, 4.0