Re: [llvm-commits] Trampoline support (pointers nested funtions)

2007-08-29 Thread Duncan Sands
Hi Evan, > > 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 :-). this is from the original version - the version I committed before the holidays already did 0xb8 | 1, and the version I just committed does it even bet

Re: [llvm-commits] Trampoline support (pointers nested funtions)

2007-08-29 Thread Evan Cheng
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

Re: [llvm-commits] Trampoline support (pointers nested funtions)

2007-08-28 Thread Duncan Sands
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

Re: [llvm-commits] Trampoline support (pointers nested funtions)

2007-08-12 Thread Duncan Sands
On Thursday 2 August 2007 02:55:57 Chris Lattner wrote: > > On Jul 31, 2007, at 3:08 PM, Evan Cheng wrote: > > >>> Also, isn't the static chain register described in > >>> X86CallingConv.td? > >> > >> It is, but it's hard to use here. The problem is that when > >> lowering the > >> init.tram

Re: [llvm-commits] Trampoline support (pointers nested funtions)

2007-08-01 Thread Chris Lattner
On Jul 31, 2007, at 3:08 PM, Evan Cheng wrote: >>> Also, isn't the static chain register described in >>> X86CallingConv.td? >> >> It is, but it's hard to use here. The problem is that when >> lowering the >> init.trampoline intrinsic you only have a pointer to the target >> function. >> F

Re: [llvm-commits] Trampoline support (pointers nested funtions)

2007-07-31 Thread Evan Cheng
On Jul 27, 2007, at 3:38 AM, Duncan Sands wrote: > Hi Evan, > >> Some nit picks. >> >> 1. Please don't use "Chain" for stand for function static chain. It >> confuses backend guys like me. :-) "Chain" stands for control flow >> dependency in the backend. > > I've replaced Chain with Nest everywhe

Re: [llvm-commits] Trampoline support (pointers nested funtions)

2007-07-27 Thread Duncan Sands
Hi Evan, I've committed the patches. X86 support was commit r40566. If you would like me to make any changes please let me know and I will take care of it when I get back from holidays. Best wishes, Duncan. ___ llvm-commits mailing list llvm-commits@cs

Re: [llvm-commits] Trampoline support (pointers nested funtions)

2007-07-27 Thread Duncan Sands
Hi Evan, > Some nit picks. > > 1. Please don't use "Chain" for stand for function static chain. It > confuses backend guys like me. :-) "Chain" stands for control flow > dependency in the backend. I've replaced Chain with Nest everywhere, eg the attribute is now 'nest'. > 2. Purely a stylis

Re: [llvm-commits] Trampoline support (pointers nested funtions)

2007-07-26 Thread Evan Cheng
Hi Duncan, Some nit picks. 1. Please don't use "Chain" for stand for function static chain. It confuses backend guys like me. :-) "Chain" stands for control flow dependency in the backend. 2. Purely a stylistic thing: +SDOperand X86TargetLowering::LowerTRAMPOLINE(SDOperand Op, +

Re: [llvm-commits] Trampoline support (pointers nested funtions)

2007-07-26 Thread Duncan Sands
There was a small mistake in the X86 error checking: i64 inreg arguments should count as consuming two registers. Fix: -InRegCount++; +InRegCount += (getTargetData()->getTypeSizeInBits(*I) + 31) / 32; ___ llvm-commits mailing lis