Displaying 4 results from an estimated 4 matches for "savecalleesavedregist".
2007 Aug 08
4
[LLVMdev] Destination register needs to be valid after callee saved register restore when tail calling
...u either violate
the ABI for callee, or you're restricted to do tail call lowering only
for internal functions, making all stuff inpractical. . Only
call-clobbered registers can be used to store pointer to callee (I'd
suggest %ecx on x86/32, btw).
> Or do i have to insert code into PEI::saveCalleeSavedRegisters to
> detect that there is a tail called function that uses a callee saved
> register and move it to another (EAX).
You shouldn't use call-saved registers at all. Only call-clobbered. It
seems, that you can use the trick similar to eh_return lowering (that
case is somehow special, b...
2007 Aug 08
1
[LLVMdev] Destination register needs to be valid after callee saved register restore when tail calling
...ed
addl $44, %esp
jmp *%esi # TAIL CALL jmpr
Is there a way to indicate that the register the tail call
instruction uses as destination needs to be valid after the callee
saved registers have been restored? (some X86InstrInfo.td foo magic
maybe ?)
Or do i have to insert code into PEI::saveCalleeSavedRegisters to
detect that there is a tail called function that uses a callee saved
register and move it to another (EAX).
that's how the TAILJMP instruction looks:
let isCall = 1, isTerminator = 1, isReturn = 1, isBarrier = 1,
noResults = 1 in
def TAILJMPr : I<0xFF, MRM4r, (ops GR32:$dst),...
2007 Aug 08
0
[LLVMdev] Destination register needs to be valid after callee saved register restore when tail calling
...n llvm-2.0 the epilogue inserter ignoring
the isTerminator instruction - note to myself: should move to trunk
soon!)
another option would be to do the move from the register holding the
function pointer to a register like ECX myself (as you say),
>> Or do i have to insert code into PEI::saveCalleeSavedRegisters to
>> detect that there is a tail called function that uses a callee saved
>> register and move it to another (EAX).
> You shouldn't use call-saved registers at all. Only call-clobbered. It
> seems, that you can use the trick similar to eh_return lowering (that
> case is...
2007 Aug 09
1
[LLVMdev] Destination register needs to be valid after callee saved register restore when tail calling
...rter ignoring
> the isTerminator instruction - note to myself: should move to trunk
> soon!)
>
> another option would be to do the move from the register holding the
> function pointer to a register like ECX myself (as you say),
>
>>> Or do i have to insert code into PEI::saveCalleeSavedRegisters to
>>> detect that there is a tail called function that uses a callee saved
>>> register and move it to another (EAX).
>> You shouldn't use call-saved registers at all. Only call-clobbered.
>> It
>> seems, that you can use the trick similar to eh_return...