diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1994-10-31 16:18:02 -0500 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1994-10-31 16:18:02 -0500 |
commit | 0bb6c81b1c3076cdfccd82bb382c4450643a1ee0 (patch) | |
tree | a4849156e74e005afd635823ace1c40a9df6fa4c | |
parent | 2f0da90602f07493b6512c5b710f46a1f85ae0b4 (diff) | |
download | gcc-0bb6c81b1c3076cdfccd82bb382c4450643a1ee0.zip gcc-0bb6c81b1c3076cdfccd82bb382c4450643a1ee0.tar.gz gcc-0bb6c81b1c3076cdfccd82bb382c4450643a1ee0.tar.bz2 |
(movsf...
(movsf, movdf, movxf): If we are moving floating point constants to a
non-memory location that aren't 0 or 1, assume we need the pic
register if -fpic.
From-SVN: r8372
-rw-r--r-- | gcc/config/i386/i386.md | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 89dca03..a4cfff5 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -1080,6 +1080,18 @@ emit_insn ((*genfunc) (operands[0], operands[1])); DONE; } + + /* If we are loading a floating point constant that isn't 0 or 1 into a register, + indicate we need the pic register loaded. This could be optimized into stores + of constants if the target eventually moves to memory, but better safe than + sorry. */ + if (flag_pic + && GET_CODE (operands[0]) != MEM + && GET_CODE (operands[1]) == CONST_DOUBLE + && !standard_80387_constant_p (operands[1])) + { + current_function_uses_pic_offset_table = 1; + } }") (define_insn "movsf_push_nomove" @@ -1249,6 +1261,18 @@ emit_insn ((*genfunc) (operands[0], operands[1])); DONE; } + + /* If we are loading a floating point constant that isn't 0 or 1 into a register, + indicate we need the pic register loaded. This could be optimized into stores + of constants if the target eventually moves to memory, but better safe than + sorry. */ + if (flag_pic + && GET_CODE (operands[0]) != MEM + && GET_CODE (operands[1]) == CONST_DOUBLE + && !standard_80387_constant_p (operands[1])) + { + current_function_uses_pic_offset_table = 1; + } }") (define_insn "movdf_push_nomove" @@ -1408,6 +1432,18 @@ emit_insn ((*genfunc) (operands[0], operands[1])); DONE; } + + /* If we are loading a floating point constant that isn't 0 or 1 into a register, + indicate we need the pic register loaded. This could be optimized into stores + of constants if the target eventually moves to memory, but better safe than + sorry. */ + if (flag_pic + && GET_CODE (operands[0]) != MEM + && GET_CODE (operands[1]) == CONST_DOUBLE + && !standard_80387_constant_p (operands[1])) + { + current_function_uses_pic_offset_table = 1; + } }") |