[LLVMdev] Question about calling convention implementation in LLVM target
Rodolphe Suescun
rsu.medal at dolphin.fr
Wed May 21 06:25:29 PDT 2014
Hi,
Thanks for your answers.
Le 15/05/2014 02:09, Jim Grosbach a écrit :
> In theory, the SPAdj (stack pointer adjustment) tracking in PEI
> could be used to support something like this. That’s not how it’s
> used right now and it might get more than a little interesting
> implementing that, though.
We didn't manage to get this working and decided to use offsets
relative to the frame pointer (instead of stack pointer) so PUSH
instructions don't affect them.
Le 17/05/2014 23:52, Herbie Robinson a écrit :
> Also, push and pop operations are slower on some architectures (I
> believe the x86_32 is one of them). Smaller instructions are not
> always faster.
Code density (which is as important as speed for us) will be better
and speed will approximately be the same (might be a bit slower in
some specific cases).
Rod
>> We are currently developing an LLVM target for a micro-controller,
>> and would like our TargetLowering::LowerCall method to emit
>> PUSH instructions (instead of STORE) to pass arguments (which
>> would improve code density for function calls).
>>
>> Is there a way of keeping track of the stack pointer changes
>> implied by the PUSH instruction to calculate the correct
>> offsets in RegisterInfo::eliminateFrameIndex when the call
>> sequence is generated ?
>>
>> Thanks a lot in advance,
>> Rod
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
More information about the llvm-dev
mailing list