[llvm-commits] [llvm] r109035 - in /llvm/trunk/lib/Target/X86: X86ISelLowering.cpp X86InstrInfo.cpp

Nate Begeman natebegeman at mac.com
Wed Jul 21 14:23:16 PDT 2010

On Jul 21, 2010, at 2:16 PM, Anton Korobeynikov wrote:

>>>> xmm6-15 are marked as clobbered by call instructions on win64 even though they aren't.
>>> They in fact are. Consider reading e.g.
>>> http://msdn.microsoft.com/en-us/library/9z1stfyw.aspx
>> Your link says they're callee-save, not call-clobbered.
> Hrm. Sorry, I should drink more coffee. Where they are marked as call-clobbered?
>> How so?  The previous code is obviously incorrect, and leads to code like the following being generated on win64 today;
>> movaps rsi, (stack)
> Right. It was broken in r105344. In any case - your change is
> incorrect :) The problem just moves to prologue / epilogue expansion
> code.

Can you explain a bit about how prolog/epilog expansion is broken?  Sorry, I'm not 100% following this yet.

> You can find the full description of the problem at
> http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090824/085827.html
> Unfortunately, I didnt't find the time since that time to make a generic fix....

I assume this is referencing:


If I recall correctly, PowerPC has an extremely similar issue with where LR/CR are stored.  I'll revert that part of the patch and work on a "more correct" one, but it seems strange that win64 wouldn't save callee-save regs in this routine, and instead choose to save them some other way.


More information about the llvm-commits mailing list