[LLVMdev] Any reason why fastcc on x86 shouldn't use ECX as a return register?

Duncan Sands baldrick at free.fr
Tue Jan 5 06:04:28 PST 2010


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.
> 
> Doesn't ECX get used to pass parameters into, rather than out of, a trampoline?

yes, I hadn't read your email carefully enough - I thought you were talking
about passing parameters in.  Sorry for the noise.

Ciao,

Duncan.



More information about the llvm-dev mailing list