Thank you Evan for your quick and helpful answer.
Actually, I want to add padding between function arguments and the
return address. I am doing this only for research purposes.
Thank you again,
Babak
---------------------------------------------------------------
Babak Salamat
PhD Student
Department of Computer Science
School of Information and Computer Sciences
University of California, Irvine
email: bsalamat at uci.edu
web: www.ics.uci.edu/~bsalamat
---------------------------------------------------------------
On Apr 24, 2007, at 4:09 PM, Evan Cheng wrote:
> Hi,
>
> During isel lowering, the backend insertes CALLSEQ_START /
> CALLSEQ_END target independent nodes to the DAG. These are then
> selected to X86 specific instructions ADJCALLSTACKDOWN /
> ADJCALLSTACKUP. At these point, they have a constant arguments which
> corresponds to the fixed frame size for argument passing. But the
> size of the stack frame isn't finalized until frame layout has been
> completed, these are not translated into stack dec / inc until very
> late (see X86RegisterInfo.cpp::eliminateCallFramePseudoInstr).
>
> May I ask why are you adding a command line option to control stack
> frame size? If you must do it, it should be separate from the general
> mechanism. You can add a couple of special instructions that are
> "flagged" to the CALLSEQ nodes that will be emitted as stack inc
/
> dec code.
>
> Evan
>
> On Apr 24, 2007, at 12:59 PM, Babak Salamat wrote:
>
>>
>> Hello,
>>
>> I am trying to add an instruction before each function call to add/
>> subtract the stack pointer by a value specified at the command line.
>> I wonder if I can do that during lowering. For example, in
>> X86TargetLowering::LowerCALL. I appreciate it if you give me some
>> hints how and where I can do that.
>>
>> Thank you,
>> Babak
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev