]> granicus.if.org Git - clang/commit
Correct VectorCall x86 (32 bit) behavior for SSE Register Assignment
authorErich Keane <erich.keane@intel.com>
Wed, 21 Jun 2017 16:37:22 +0000 (16:37 +0000)
committerErich Keane <erich.keane@intel.com>
Wed, 21 Jun 2017 16:37:22 +0000 (16:37 +0000)
commita807ad0a5a57cbe9e283d74b538a08f5e1445cb2
tree1de2d3f8661bdf5985fd58f33d1f7ea49674c5c6
parent100ecde90ef26ee81763214d5fb335415ffc2b53
Correct VectorCall x86 (32 bit) behavior for SSE Register Assignment

In running some internal vectorcall tests in 32 bit mode, we discovered that the
behavior I'd previously implemented for x64 (and applied to x32) regarding the
assignment of SSE registers was incorrect. See spec here:
https://msdn.microsoft.com/en-us/library/dn375768.aspx

My previous implementation applied register argument position from the x64
version to both. This isn't correct for x86, so this removes and refactors that
section. Additionally, it corrects the integer/int-pointer assignments. Unlike
x64, x86 permits integers to be assigned independent of position.

Finally, the code for 32 bit was cleaned up a little to clarify the intent,
as well as given a descriptive comment.

Differential Revision: https://reviews.llvm.org/D34455

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305928 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/TargetInfo.cpp
test/CodeGen/vectorcall.c