OSDN Git Service

Work around x86-64 calling convention bug
authorNicolas Capens <capn@google.com>
Fri, 15 Feb 2019 19:41:03 +0000 (14:41 -0500)
committerNicolas Capens <nicolascapens@google.com>
Tue, 26 Feb 2019 15:41:25 +0000 (15:41 +0000)
commit2ff3639d85d76d1d644267277e283d7c78dabc3c
treea282fbb98a41d5f582eb64e4db7ba47e2a10e433
parent9a16248dedf36fe2ff515a2e6def852ade6784ed
Work around x86-64 calling convention bug

Microsoft's x86-64 calling convention ABI requires registers XMM6-15 to
be preserved by the callee:
https://docs.microsoft.com/en-us/cpp/build/x64-calling-convention?view=vs-2017#calling-convention-defaults
Currently only the System V calling convention's behavior is supported,
which does not have any callee-saved XMM registers.

Fixing this properly is non-trivial and this bug is blocking other
projects, so a temporary workaround is to limit Subzero to use only
scratch registers XMM0-XMM5.

Bug chromium:931926
Bug swiftshader:22

Change-Id: If3fde2295fc65fc52042124afe7dfc46873cce3f
Reviewed-on: https://swiftshader-review.googlesource.com/c/25568
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
src/Common/Version.h
third_party/subzero/src/IceInstX8664.def