Bug 13297 - in x86 target -msoft_float should imply -mno-fp-ret-in-387
Summary: in x86 target -msoft_float should imply -mno-fp-ret-in-387
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 3.2.1
: P2 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-04 08:32 UTC by John Yau
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Yau 2003-12-04 08:32:05 UTC
If -msoft_float is used to generate hooks for linking to FP emulation library, 
the results and arguments and results are still passed via the x87 stack if -
mno-fp-ret-in-387 is not defined as well.  This will generate invalid code for 
many embedded x86 platforms that do not have an FPU (e.g. AMD SC420).

-msoft_float should imply -mno-fp-ret-in-387 to avoid confusion.  At the bare 
minimum, a note regarding switching on -mno-fp-ret-in-387 in conjunction with -
msoft_float when developing on FPU-less platforms should be mentioned.
Comment 1 Andrew Pinski 2003-12-04 08:38:58 UTC
The manual already warns about this:
-msoft-float 
.....
On machines where a function returns floating point results in the 80387 register stack, some 
floating point opcodes may be emitted even if -msoft-float is used.