This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Help with implementing Wine optimization experiment


I'm stuck on generating a jmp to the epilogue as I can't find any examples of this. This is the summarized version of what I'm doing:

rtx msabi_restore_fn, jump_insn;

msabi_restore_fn = gen_rtx_SYMBOL_REF (Pmode, "__msabi_restore");
SYMBOL_REF_FLAGS (msabi_restore_fn) |= SYMBOL_FLAG_LOCAL;
jump_insn = gen_rtx_SET (VOIDmode, pc_rtx, gen_rtx_MEM (QImode, msabi_restore_fn));
emit_insn (jump_insn);

Unfortunately, it dies with:

../a.c: In function ‘my_ms_sysv’:
../a.c:7:1: error: unrecognizable insn:
 }
 ^
(insn 15 14 8 2 (set/f (pc)
(mem:QI (symbol_ref:DI ("__msabi_restore") [flags 0x2]) [0 S1 A8])) ../a.c:7 -1
     (nil))
../a.c:7:1: internal compiler error: in extract_insn, at recog.c:2343
0xc195e1 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*)
        ../../gcc/rtl-error.c:110
0xc19622 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
        ../../gcc/rtl-error.c:118
0xbcd683 extract_insn(rtx_insn*)
        ../../gcc/recog.c:2343
0xbcd37c extract_constrain_insn(rtx_insn*)
        ../../gcc/recog.c:2244
0xbdc310 copyprop_hardreg_forward_1
        ../../gcc/regcprop.c:793
0xbdd97d execute
        ../../gcc/regcprop.c:1289

How should I generate this jmp? All of the various helper functions for generating a jump appear to be tailored for using a label and I'm using a symbol. I haven't yet attached all of the various notes to the insn yet. My call to the prologue routine is working great though!

Thanks,
Daniel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]