Hi,
I am having an RTL problem trying to make a function call from a
COND_EXEC rtx. The reload pass has been called, and very simply I
want to compare on an 64bit x86 %rdx with a specific integer value,
and if that value is true, my function call executes. I can call the
function fine outside of the conditional, but when I set it in the
conditional expression, I get the following error:
test.c:6:1: error: unrecognizable insn:
(insn 27 13 20 2 (cond_exec (eq:BI (const_int 42 [0x2a])
(reg:DI 1 dx))
(call (mem:DI (symbol_ref:DI ("abort")) [0 S8 A8])
(const_int 0 [0]))) -1
(nil))
test.c:6:1: internal compiler error: in insn_default_length, at
config/i386/i386.md:591
The original code for the condition:
rtx cmp = gen_rtx_EQ(
BImode,
gen_rtx_CONST_INT(VOIDmode, 42),
gen_rtx_REG(DImode, 1));
And the original code for the COND_EXEC expression, which is what I
emit into the program:
rtx sym = gen_rtx_SYMBOL_REF(Pmode, "abort");
rtx abrt_addr = gen_rtx_MEM(Pmode, sym);
rtx abrt = gen_rtx_CALL(VOIDmode, abrt_addr, const0_rtx);
rtx cond = gen_rtx_COND_EXEC(VOIDmode, cmp, abrt);
Thanks
-Matt