Fixed fef.s: did not work for unnormalized numbers

This commit is contained in:
ceriel 1991-11-15 09:47:44 +00:00
parent c3de1a9bea
commit 64ce6b0ef4

View file

@ -13,15 +13,28 @@ fef8:
st %g0,[%l0]
retl
nop
1: ld [%l0+4],%o0
srl %o0, 20, %o1
and %o1, 0x7ff, %o1
dec 0x3fe, %o1
1:
fdtox %f0,%f0
st %f0,[%l0+4]
ld [%l0+4],%o0
srl %o0,16,%o0
set 0x7fff,%o2
and %o0,%o2,%o1
set 16382,%o3
sub %o1,%o3,%o1
st %o1,[%l0]
set 0x7ff00000, %o1
andn %o0, %o1, %o0
set 0x3fe00000, %o1
or %o0, %o1, %o0
set 0x8000,%o2
and %o0,%o2,%o0
or %o0,%o3,%o0
sll %o0,16,%o0
ld [%l0+4],%o1
set 0xffff,%o2
and %o1,%o2,%o1
or %o1,%o0,%o0
st %o0,[%l0+4]
ld [%l0+4],%f0
fxtod %f0,%f0
st %f0,[%l0+4]
st %f1,[%l0+8]
retl
nop