Article View: gnu.gcc.bug
Article #2668gcc-1.35/i386gas/COFF-ENCAP FP bug
From: William G. Bunton
Date: Mon, 22 May 1989 23:56
Date: Mon, 22 May 1989 23:56
48 lines
2216 bytes
2216 bytes
I believe I've found the problem with floating point
subtraction/division. Appearently, most 386 compilers generate
incorrect code for the 'reversed' forms of fsub and fdiv. A comment in
config/out-i386.c notes this fact, and uses the 'unreversed' forms
instead. This is a problem when using GAS, since GAS gets it right. To
correct, copy config/out-i386.c to config/out-i386g.c, run the
following through patch, and the run config.gcc again. This creates
out-i386g.c using the proper reversed insn, which seems to cure the
problem, and not break anything else.
*** config.gcc~ Fri May 19 18:36:15 1989
--- config.gcc Mon May 22 17:24:30 1989
***************
*** 81,86 ****
--- 81,87 ----
cpu_type=i386
configuration_file=xm-i386v.h
target_machine=tm-i386gas.h
+ aux_output=out-i386g.c
;;
next )
cpu_type=m68k
*** config/out-i386g.c~ Mon May 22 17:21:29 1989
--- config/out-i386g.c Mon May 22 17:22:53 1989
***************
*** 142,148 ****
which exchanges the meanings of fsubr and fsub, and of fdivr and fdiv!
So use the "unreversed" opcode (which will assemble into
the "reversed" insn). */
! rev = op;
while (*rev && *rev != '%')
fputc (*rev++, asm_out_file);
--- 142,150 ----
which exchanges the meanings of fsubr and fsub, and of fdivr and fdiv!
So use the "unreversed" opcode (which will assemble into
the "reversed" insn). */
! /* This only appears true of AT&T assemblers; at least gas1.31 seems
! to get it right, so we'll use the reversed opcode correctly */
! /* rev = op; */
while (*rev && *rev != '%')
fputc (*rev++, asm_out_file);
Bill
--
William G. Bunton wgb@tntdev.tnt.com {uunet,natinst}!tntdev!wgb
Tools & Techniques, Inc. Austin, TX
Technical Details
Message-ID:
<8905222356.AA10633@tntdev.tnt.COM>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!tntdev.tnt.com!wgbShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!tntdev.tnt.com!wgb From: wgb@tntdev.tnt.com (William G. Bunton) Newsgroups: gnu.gcc.bug Subject: gcc-1.35/i386gas/COFF-ENCAP FP bug Message-ID: <8905222356.AA10633@tntdev.tnt.COM> Date: 22 May 89 23:56:43 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 48