[LLVMdev] What CCAssignToXXXWithShadow means?

Anton Korobeynikov anton at korobeynikov.info
Fri Sep 23 04:43:51 PDT 2011


Hello

>  I think ecx and xmm0 are physical different registers (not like ecx
> and cx), right? So why we cannot use xmm0 while ecx has been used? Is
> it just a rule or there are some considerations behind it?
Yes. Due to way how varargs stuff is implemented. You always have data
in, say, general-purpose regs regardless of whether it's floating
point or integer.

>  If we assign to R0, then R0 is marked occupied. Is it a redundant
> statement?
Here - yes. Just to make sure alignment works.

>  If you can point me to some reference aboue "register alignment", I'll
> be very appreciate it. Does register alignment bring benefit? In other
> word, why register alignment is needed?
This is documented in AAPCS ABI.

>  So the word "shadow" on http://www.heyrick.co.uk/assembler/regs.html
> means different thing, hugh?
Yes. Here "shadow" is Microsoft term.
Check
http://msdn.microsoft.com/en-US/library/zthk2dkh(v=VS.80).aspx
and
http://msdn.microsoft.com/en-US/library/6yy8aw4d(v=VS.80).aspx

for more information

-- 
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University




More information about the llvm-dev mailing list