I'm trying to implement long jump and I'm using the call instruction in the arm implementation as a reference.
The code looks like this: rtx callee, pat; callee = XEXP(operands[0], 0); if (GET_CODE (callee) == SYMBOL_REF ? atdsp_is_long_call_p (SYMBOL_REF_DECL (callee)) : !REG_P (callee)) { XEXP(operands[0], 0) = force_reg (SImode, callee); } pat = gen_call_internal (operands[0], operands[1]); emit_call_insn(pat); DONE; What I want to happen is for the function name to be copied to a register and then the compiler emit the instruction to call the function, by jumping to the address held in that register. The compiler emits instructions that copy the function name to a register, then it loads from the value of this register, before jumping to the loaded value. What I want it to do is copy the function name to the register, then jump to the address held in this register. Does anyone know what it is I've done wrong and how I can get this to work? Thanks Neil