From: Uros Bizjak Date: Fri, 31 Oct 2014 21:52:22 +0000 (+0100) Subject: re PR rtl-optimization/63620 (RELOAD lost SET_GOT dependency on Darwin) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8e454d55b9058dc0092a7206552ab889023127a7;p=gcc.git re PR rtl-optimization/63620 (RELOAD lost SET_GOT dependency on Darwin) 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8fb70a1b190..1de83445907 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,7 +1,9 @@ 2014-10-31 Uros Bizjak 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. diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h index 81a1f11a187..c9cee996e2b 100644 --- a/gcc/config/i386/i386-protos.h +++ b/gcc/config/i386/i386-protos.h @@ -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); diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 9b224456f7d..bef00aebf7c 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -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 diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 7e4f328aa7f..f8dd5475ede 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -2738,7 +2738,8 @@ [(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]))" { @@ -2766,7 +2767,8 @@ (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" { @@ -2800,7 +2802,8 @@ (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)