Kenneth Uildriks
2009-Dec-14 15:01 UTC
[LLVMdev] Any reason why fastcc on x86 shouldn't use ECX as a return register?
Now that we can safely return arbitrarily large structs on x86, it seems to me that fastcc, which doesn't have to conform to any preexisting ABI, should use ECX as well as EAX and EDX for returning {i32,i32,i32} rather than use sret-demotion. Any objections?
Chris Lattner
2009-Dec-14 17:52 UTC
[LLVMdev] Any reason why fastcc on x86 shouldn't use ECX as a return register?
On Dec 14, 2009, at 7:01 AM, Kenneth Uildriks wrote:> Now that we can safely return arbitrarily large structs on x86, it > seems to me that fastcc, which doesn't have to conform to any > preexisting ABI, should use ECX as well as EAX and EDX for returning > {i32,i32,i32} rather than use sret-demotion. > > Any objections?Seems fine to me, just make sure to do EAX then EDX then ECX because {i32,i32} is important for other ABI reasons. -Chris
Duncan Sands
2010-Jan-05 07:22 UTC
[LLVMdev] Any reason why fastcc on x86 shouldn't use ECX as a return register?
Hi Kenneth,> Now that we can safely return arbitrarily large structs on x86, it > seems to me that fastcc, which doesn't have to conform to any > preexisting ABI, should use ECX as well as EAX and EDX for returning > {i32,i32,i32} rather than use sret-demotion.the x86 trampoline lowering code would need tweaking to check that the ECX register was available for it. Ciao, Duncan.
Kenneth Uildriks
2010-Jan-05 14:01 UTC
[LLVMdev] Any reason why fastcc on x86 shouldn't use ECX as a return register?
On Tue, Jan 5, 2010 at 1:22 AM, Duncan Sands <baldrick at free.fr> wrote:> Hi Kenneth, > >> Now that we can safely return arbitrarily large structs on x86, it >> seems to me that fastcc, which doesn't have to conform to any >> preexisting ABI, should use ECX as well as EAX and EDX for returning >> {i32,i32,i32} rather than use sret-demotion. > > the x86 trampoline lowering code would need tweaking to check that the ECX > register was available for it. > > Ciao, > > Duncan. >Doesn't ECX get used to pass parameters into, rather than out of, a trampoline?
Apparently Analagous Threads
- [LLVMdev] Any reason why fastcc on x86 shouldn't use ECX as a return register?
- [LLVMdev] Any reason why fastcc on x86 shouldn't use ECX as a return register?
- [LLVMdev] Non-local DSE optimization
- [LLVMdev] Non-local DSE optimization
- [LLVMdev] Non-local DSE optimization