Re: [issue18062] m68k FPU precision issue
Mark Dickinson dixit:
>If there are tests failing with the 'legacy' mode, that may just
>indicate buggy tests that haven't been properly marked as depending on
>the short float repr. (E.g., by decorating with
I think that’s what we’re seeing here.
Python 3.3.1 (default, May 10 2013, 02:52:57)
[GCC 4.6.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.float_repr_style
'legacy'
Andreas Schwab dixit:
>What is the exact sequence of fpu insns?
That’s all gcc-generated code and a system header…
In main (after commenting out the second getcw and printf):
jsr runtests
#APP
| 34 "x.c" 1
fmove.l %fpcr, %d2
| 0 "" 2
#NO_APP
move.l %d2,-4(%fp)
move.l #128,-8(%fp)
#APP
| 40 "x.c" 1
fmove.l -8(%fp), %fpcr
| 0 "" 2
#NO_APP
jsr runtests
And the subroutine:
runtests:
link.w %fp,#-24
move.l %d3,-(%sp)
move.l %d2,-(%sp)
move.l #1072693247,-8(%fp)
move.l #-1,-4(%fp)
move.l -8(%fp),%d0
move.l -4(%fp),%d1
fmovecr #0x32,%fp0
move.l %d1,-(%sp)
move.l %d0,-(%sp)
fmove.d (%sp)+,%fp1
fdiv.x %fp1,%fp0
fmove.d %fp0,-(%sp)
move.l (%sp)+,%d0
move.l (%sp)+,%d1
move.l %d0,-16(%fp)
move.l %d1,-12(%fp)
move.l -16(%fp),%d2
move.l -12(%fp),%d3
move.l -16(%fp),%a0
move.l -12(%fp),%a1
move.l #1072693248,%d0
clr.l %d1
move.l %a1,-(%sp)
move.l %a0,-(%sp)
fmove.d (%sp)+,%fp0
move.l %d1,-(%sp)
move.l %d0,-(%sp)
fmove.d (%sp)+,%fp1
fcmp.x %fp1,%fp0
fjne .L2
move.l #.LC0,%d0
jra .L3
.L2:
move.l #.LC1,%d0
.L3:
move.l #.LC2,%d1
move.l %d3,-(%sp)
move.l %d2,-(%sp)
move.l %d0,-(%sp)
move.l %d1,-(%sp)
jsr printf
lea (16,%sp),%sp
move.l #1128383353,-8(%fp)
move.l #937459712,-4(%fp)
move.l #1074266106,-16(%fp)
move.l #-1043161657,-12(%fp)
move.l -8(%fp),%a0
move.l -4(%fp),%a1
move.l -16(%fp),%d0
move.l -12(%fp),%d1
move.l %a1,-(%sp)
move.l %a0,-(%sp)
fmove.d (%sp)+,%fp0
move.l %d1,-(%sp)
move.l %d0,-(%sp)
fmove.d (%sp)+,%fp1
fadd.x %fp1,%fp0
fmove.d %fp0,-(%sp)
move.l (%sp)+,%d0
move.l (%sp)+,%d1
move.l %d0,-24(%fp)
move.l %d1,-20(%fp)
move.l -24(%fp),%a0
move.l -20(%fp),%a1
move.l -24(%fp),%d0
move.l -20(%fp),%d1
move.l %d1,-(%sp)
move.l %d0,-(%sp)
fmove.d (%sp)+,%fp0
fcmp.d #0x4341c37937e08002,%fp0
fjne .L4
move.l #.LC0,%d0
jra .L5
.L4:
move.l #.LC1,%d0
.L5:
move.l #.LC3,%d1
move.l %a1,-(%sp)
move.l %a0,-(%sp)
move.l %d0,-(%sp)
move.l %d1,-(%sp)
jsr printf
lea (16,%sp),%sp
move.l -32(%fp),%d2
move.l -28(%fp),%d3
unlk %fp
rts
bye,
//mirabilos
--
Yay for having to rewrite other people's Bash scripts because bash
suddenly stopped supporting the bash extensions they make use of
-- Tonnerre Lombard in #nosec
Reply to: