re PR rtl-optimization/63620 (RELOAD lost SET_GOT dependency on Darwin)
authorUros Bizjak <ubizjak@gmail.com>
Fri, 31 Oct 2014 21:52:22 +0000 (22:52 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Fri, 31 Oct 2014 21:52:22 +0000 (22:52 +0100)
PR target/63620
* config/i386/i386-protos.h (ix86_use_pseudo_pic_reg): Declare.
* config/i386/i386.c (ix86_use_pseudo_pic_reg): Export.
* config/i386/i386.md (*pushtf): Allow only CONST_DOUBLEs that won't
be reloaded through memory.
(*pushxf): Ditto.
(*pushdf): Ditto.

From-SVN: r216990

gcc/ChangeLog
gcc/config/i386/i386-protos.h
gcc/config/i386/i386.c
gcc/config/i386/i386.md

index 8fb70a1b190d1dc1767f63d8090ba077e483456a..1de834459072c64a53a168d112bdf9bd26d61045 100644 (file)
@@ -1,7 +1,9 @@
 2014-10-31  Uros Bizjak  <ubizjak@gmail.com>
 
        PR target/63620
-       * config/i386/i386.md (*pushtf): Allow only CONST_DOUBLES that won't
+       * config/i386/i386-protos.h (ix86_use_pseudo_pic_reg): Declare.
+       * config/i386/i386.c (ix86_use_pseudo_pic_reg): Export.
+       * config/i386/i386.md (*pushtf): Allow only CONST_DOUBLEs that won't
        be reloaded through memory.
        (*pushxf): Ditto.
        (*pushdf): Ditto.
index 81a1f11a18753079c7c5f6208aed38bacbe8e98a..c9cee996e2b7ea86d2f506a7dccd2747b2f07190 100644 (file)
@@ -42,6 +42,8 @@ extern enum calling_abi ix86_function_type_abi (const_tree);
 
 extern void ix86_reset_previous_fndecl (void);
 
+extern bool ix86_use_pseudo_pic_reg (void);
+
 #ifdef RTX_CODE
 extern int standard_80387_constant_p (rtx);
 extern const char *standard_80387_constant_opcode (rtx);
index 9b224456f7d2b4e253e93ade2348516d214190bc..bef00aebf7c4d834d2c05f9918fff6d37982069d 100644 (file)
@@ -6158,7 +6158,7 @@ ix86_maybe_switch_abi (void)
 
 /* Return 1 if pseudo register should be created and used to hold
    GOT address for PIC code.  */
-static bool
+bool
 ix86_use_pseudo_pic_reg (void)
 {
   if ((TARGET_64BIT
index 7e4f328aa7f93bb617efb668af52c88012c6cfad..f8dd5475edef2a7b008c31fd315921d975b0128c 100644 (file)
   [(set (match_operand:TF 0 "push_operand" "=<,<")
        (match_operand:TF 1 "general_no_elim_operand" "x,*roF"))]
   "(TARGET_64BIT || TARGET_SSE)
-   && (!can_create_pseudo_p ()
+   && (!ix86_use_pseudo_pic_reg ()
+       || !can_create_pseudo_p ()
        || GET_CODE (operands[1]) != CONST_DOUBLE
        || standard_sse_constant_p (operands[1]))"
 {
 (define_insn "*pushxf"
   [(set (match_operand:XF 0 "push_operand" "=<,<")
        (match_operand:XF 1 "general_no_elim_operand" "f,Yx*roF"))]
-  "!can_create_pseudo_p ()
+  "!ix86_use_pseudo_pic_reg ()
+   || !can_create_pseudo_p ()
    || GET_CODE (operands[1]) != CONST_DOUBLE
    || standard_80387_constant_p (operands[1]) > 0"
 {
 (define_insn "*pushdf"
   [(set (match_operand:DF 0 "push_operand" "=<,<,<,<")
        (match_operand:DF 1 "general_no_elim_operand" "f,Yd*roF,rmF,x"))]
-  "!can_create_pseudo_p ()
+  "!ix86_use_pseudo_pic_reg ()
+   || !can_create_pseudo_p ()
    || GET_CODE (operands[1]) != CONST_DOUBLE
    || (!(TARGET_SSE2 && TARGET_SSE_MATH)
        && standard_80387_constant_p (operands[1]) > 0)