diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2012-07-06 12:00:11 +0200 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2012-07-06 12:00:11 +0200 |
commit | dea8f801d300077191cf65016069ce1554e96521 (patch) | |
tree | 7e1b54ddd5bd1abd699d97f47ab6a5956182ee90 | |
parent | c253bc8cd89728259ebfc568c287aa085d9b8397 (diff) | |
download | gcc-dea8f801d300077191cf65016069ce1554e96521.zip gcc-dea8f801d300077191cf65016069ce1554e96521.tar.gz gcc-dea8f801d300077191cf65016069ce1554e96521.tar.bz2 |
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
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 4 |
2 files changed, 10 insertions, 0 deletions
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 <ubizjak@gmail.com> + + 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 <ebotcazou@adacore.com> 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); |