+2016-03-07 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/70064
+ * config/i386/i386.h (machine_function): Add
+ pc_thunk_call_expanded flag.
+ (ix86_pc_thunk_call_expanded): New define.
+ * config/i386/i386.md (set_got, set_got_labelled): New expanders.
+ (*set_got): Rename insn pattern from set_got.
+ (*set_got_labelled): Rename inst pattern from set_got_labelled.
+ * config/i386/i386.c (ix86_compute_frame_layout): Use
+ ix86_pc_thunk_call_expanded to prevent red-zone.
+
2016-03-07 Martin Jambor <mjambor@suse.cz>
* hsa.h (hsa_get_ctor_statements): Declare.
-fno-branch-count-reg.
2016-02-26 Richard Biener <rguenther@suse.de>
- Jeff Law <law@redhat.com>
+ Jeff Law <law@redhat.com>
PR tree-optimization/69740
* cfghooks.c (remove_edge): Request loop fixups if we delete
2016-03-05 Venkataramanan Kumar <Venkataramanan.kumar@amd.com>
Fix sseimul type attribute.
- * config/i386/znver1.md
+ * config/i386/znver1.md
(znver1_sseimul, znver1_sseimul_avx256, znver1_sseimul_load,
znver1_sseimul_avx256_load) : Fix the type attribute.
- (znver1_sseimul_di,
- znver1_sseimul_load_di): Fix type attribute, pipe usage and latency.
+ (znver1_sseimul_di, znver1_sseimul_load_di): Fix type attribute,
+ pipe usage and latency.
2016-03-05 Jakub Jelinek <jakub@redhat.com>
* gimplify.c (gimplify_decl_expr): For decls with REFERENCE_TYPE, also
gimplify_type_sizes the type they refer to.
(omp_notice_variable): Handle reference vars to VLAs.
- * omp-low.c (lower_omp_target): Emit setup of OMP_CLAUSE_PRIVATE reference
- to VLA decls in the second pass instead of first pass.
+ * omp-low.c (lower_omp_target): Emit setup of OMP_CLAUSE_PRIVATE
+ reference to VLA decls in the second pass instead of first pass.
2016-03-02 Tom de Vries <tom@codesourcery.com>
* config.gcc (mep-*-elf): Add newlib-stdint.h to tm_file.
2016-03-02 Richard Biener <rguenther@suse.de>
- Uros Bizjak <ubizjak@gmail.com>
+ Uros Bizjak <ubizjak@gmail.com>
PR target/67278
* config/i386/i386.c (type_natural_mode): Handle XFmode vectors.
* tree-ssa-threadbackward.c (fsm_find_control_statement_thread_paths):
Do count some PHIs in the thread path against the insn count. Decrease
final statement count by one as the control statement in the last
- block will get removed. Remove special cased code for handling PHIs in the last block.
+ block will get removed. Remove special cased code for handling PHIs
+ in the last block.
2016-03-01 Uros Bizjak <ubizjak@gmail.com>
xops[1] = gen_rtx_SYMBOL_REF (Pmode, GOT_SYMBOL_NAME);
- if (!flag_pic)
- {
- if (TARGET_MACHO)
- /* We don't need a pic base, we're not producing pic. */
- gcc_unreachable ();
-
- xops[2] = gen_rtx_LABEL_REF (Pmode, label ? label : gen_label_rtx ());
- output_asm_insn ("mov%z0\t{%2, %0|%0, %2}", xops);
- targetm.asm_out.internal_label (asm_out_file, "L",
- CODE_LABEL_NUMBER (XEXP (xops[2], 0)));
- }
- else
+ if (flag_pic)
{
char name[32];
get_pc_thunk_name (name, REGNO (dest));
CODE_LABEL_NUMBER (label));
#endif
}
+ else
+ {
+ if (TARGET_MACHO)
+ /* We don't need a pic base, we're not producing pic. */
+ gcc_unreachable ();
+
+ xops[2] = gen_rtx_LABEL_REF (Pmode, label ? label : gen_label_rtx ());
+ output_asm_insn ("mov%z0\t{%2, %0|%0, %2}", xops);
+ targetm.asm_out.internal_label (asm_out_file, "L",
+ CODE_LABEL_NUMBER (XEXP (xops[2], 0)));
+ }
if (!TARGET_MACHO)
output_asm_insn ("add%z0\t{%1, %0|%0, %1}", xops);
if (ix86_using_red_zone ()
&& crtl->sp_is_unchanging
&& crtl->is_leaf
+ && !ix86_pc_thunk_call_expanded
&& !ix86_current_function_calls_tls_descriptor)
{
frame->red_zone_size = to_allocate;
expander to determine the style used. */
BOOL_BITFIELD use_fast_prologue_epilogue : 1;
+ /* Nonzero if the current function calls pc thunk and
+ must not use the red zone. */
+ BOOL_BITFIELD pc_thunk_call_expanded : 1;
+
/* If true, the current function needs the default PIC register, not
an alternate register (on x86) and must not use the red zone (on
x86_64), even if it's a leaf function. We don't want the
#define ix86_varargs_fpr_size (cfun->machine->varargs_fpr_size)
#define ix86_optimize_mode_switching (cfun->machine->optimize_mode_switching)
#define ix86_current_function_needs_cld (cfun->machine->needs_cld)
+#define ix86_pc_thunk_call_expanded (cfun->machine->pc_thunk_call_expanded)
#define ix86_tls_descriptor_calls_expanded_in_cfun \
(cfun->machine->tls_descriptor_call_expanded_p)
/* Since tls_descriptor_call_expanded is not cleared, even if all TLS
""
"ix86_expand_prologue (); DONE;")
-(define_insn "set_got"
+(define_expand "set_got"
+ [(parallel
+ [(set (match_operand:SI 0 "register_operand" "=r")
+ (unspec:SI [(const_int 0)] UNSPEC_SET_GOT))
+ (clobber (reg:CC FLAGS_REG))])]
+ "!TARGET_64BIT"
+{
+ if (flag_pic && !TARGET_VXWORKS_RTP)
+ ix86_pc_thunk_call_expanded = true;
+})
+
+(define_insn "*set_got"
[(set (match_operand:SI 0 "register_operand" "=r")
(unspec:SI [(const_int 0)] UNSPEC_SET_GOT))
(clobber (reg:CC FLAGS_REG))]
[(set_attr "type" "multi")
(set_attr "length" "12")])
-(define_insn "set_got_labelled"
+(define_expand "set_got_labelled"
+ [(parallel
+ [(set (match_operand:SI 0 "register_operand" "=r")
+ (unspec:SI [(label_ref (match_operand 1))]
+ UNSPEC_SET_GOT))
+ (clobber (reg:CC FLAGS_REG))])]
+ "!TARGET_64BIT"
+{
+ if (flag_pic && !TARGET_VXWORKS_RTP)
+ ix86_pc_thunk_call_expanded = true;
+})
+
+(define_insn "*set_got_labelled"
[(set (match_operand:SI 0 "register_operand" "=r")
(unspec:SI [(label_ref (match_operand 1))]
UNSPEC_SET_GOT))