From dea8f801d300077191cf65016069ce1554e96521 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Fri, 6 Jul 2012 12:00:11 +0200 Subject: re PR target/53811 (ICE: in insn_default_length, at config/i386/i386.md:529 (unrecognizable insn) with -mcmodel=large) PR target/53811 * config/i386/i386.c (x86_output_mi_thunk): For CM_LARGE_PIC model, emit PIC sequence for fnaddr symbol reference in advance. From-SVN: r189315 --- gcc/ChangeLog | 6 ++++++ gcc/config/i386/i386.c | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 40c1653..d6d932b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2012-07-06 Uros Bizjak + + PR target/53811 + * config/i386/i386.c (x86_output_mi_thunk): For CM_LARGE_PIC model, + emit PIC sequence for fnaddr symbol reference in advance. + 2012-07-06 Eric Botcazou Revert diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 59e2bbc..857cd03 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -33057,6 +33057,10 @@ x86_output_mi_thunk (FILE *file, emit_jump_insn (gen_indirect_jump (fnaddr)); else { + if (ix86_cmodel == CM_LARGE_PIC && SYMBOLIC_CONST (fnaddr)) + fnaddr = legitimize_pic_address (fnaddr, + gen_rtx_REG (Pmode, tmp_regno)); + if (!sibcall_insn_operand (fnaddr, word_mode)) { tmp = gen_rtx_REG (word_mode, tmp_regno); -- cgit v1.1