i386.c (x86_ext_80387_constants): Use 80387 insns to load mathematical constants...
authorRoger Sayle <roger@eyesopen.com>
Sun, 16 Feb 2003 01:35:38 +0000 (01:35 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Sun, 16 Feb 2003 01:35:38 +0000 (01:35 +0000)
commit881b2a9652748adad442a2d634eb2970a476fe42
treec5992b263188c567bbeaa331e4c8c317af271e2c
parentd203738b3a8967e2f096288da68075154c81bcb2
i386.c (x86_ext_80387_constants): Use 80387 insns to load mathematical constants on K6, Athlon, Pentium 4 and PPro.

2003-02-15  Roger Sayle  <roger@eyesopen.com>

* config/i386/i386.c (x86_ext_80387_constants): Use 80387 insns
to load mathematical constants on K6, Athlon, Pentium 4 and PPro.
(ext_80387_constants_table): Global table of 80387 special constants
guarded by ext_80387_constants_init flag when not initialized.
(init_ext_80387_constants): New function to initialize this table.
(standard_80387_constant_p): Extend to recognize extra 80387
constants, in XFmode, on processors where this is a win.
(standard_80387_constant_opcode): New function to return the
opcode associated with standard_80387_constant_p.
(standard_80387_constant_rtx): New function to return the XFmode
CONST_DOUBLE associated with standard_80387_constant_p.
(ix86_rtx_costs): Give the new constants the same cost as 1.0.

* config/i386/i386-protos.h (standard_80387_constant_opcode):
Prototype here.
(standard_80387_constant_rtx): Likewise.

* config/i386/i386.md (*movsf1, *movsf1_nointerunit, *movdf_nointeger,
*movdf_integer, *movxf_nointeger, *movtf_nointeger, *movxf_integer,
*movtf_integer): Simplify using new standard_80387_constant_opcode.

* gcc.dg/i386-387-3.c: New test case.

From-SVN: r62958
gcc/ChangeLog
gcc/config/i386/i386-protos.h
gcc/config/i386/i386.c
gcc/config/i386/i386.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/i386-387-3.c [new file with mode: 0644]