pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/34616: TME sun3 emulator incorrectly emulates FNEG M68K instruction



>Number:         34616
>Category:       pkg
>Synopsis:       TME sun3 emulator incorrectly emulates FNEG M68K instruction
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Sep 25 21:20:00 +0000 2006
>Originator:     Arthur Townsend
>Release:        3.0
>Organization:
>Environment:
3.0 for i386
>Description:
TME calcultes the FNEG of VAL by calculating (0 - VAL), which normally works, 
but fails when VAL is 0.0.  On a real Sun3, the FNEG of 0.0 is -0.0.  This can 
be seen by running the gcc-3.3.3 testsuite gcc.dg/mzero3.c.
>How-To-Repeat:
gcc mzero3.c
./a.out
>Fix:
change TME's method of calculating FNEG from (0 - VAL) to (-1.0 * VAL).

change ieee754-ops-auto.sh, line 252, from:
partial-neg | unknown-neg) op0=0 ; op_builtin='-'; op1=src0 ;;
to
partial-neg | unknown-neg) op0=-1.0 ; op_builtin='*'; op1=src ;;

then do a make/make install to rebuild ieee754-ops-auto.c




Home | Main Index | Thread Index | Old Index