[llvm-commits] Trampoline support (pointers nested funtions)
Evan Cheng
evan.cheng at apple.com
Wed Aug 29 10:58:48 PDT 2007
On Aug 28, 2007, at 11:46 AM, Duncan Sands wrote:
> Hi Evan, thanks for your comments.
>
>>>> 3. In X86TargetLowering::LowerTRAMPOLINE():
>>>> + case CallingConv::X86_StdCall: {
>>>> + Move = 0xb9; // Pass chain in ECX
>>>>
>>>> I assume this is the ModR/M byte?
>>>
>>> Well, it's MOV32ri.
>>
>> Then it should be 0xb8?
>
> It already had ECX or'd in.
Then plz write something like "0xb8 | 1" and comment it so it's more
clear (to me at least :-).
>
>> Please factor out getX86RegNum() as well. Perhaps put them in
>> X86RegisterInfo.cpp (since lowering really shouldn't depend on
>> codeemitter...) Do getX86RegNum(X86::EAX) rather than make use
>> N86::EAX directly.
> ...
>> Please go through X86InstrInfo to get the opcode numbers instead of
>> hard coding it.
>
> Does the attached patch seem OK?
Yes, thx.
Evan
>
> Ciao,
>
> Duncan.
> <tr.diff>
More information about the llvm-commits
mailing list