Commit 2ff3639d by Nicolas Capens Committed by Nicolas Capens

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/25568Tested-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com>
parent 9a16248d
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#define MAJOR_VERSION 4 #define MAJOR_VERSION 4
#define MINOR_VERSION 1 #define MINOR_VERSION 1
#define BUILD_VERSION 0 #define BUILD_VERSION 0
#define BUILD_REVISION 5 #define BUILD_REVISION 6
#define STRINGIFY(x) #x #define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x) #define MACRO_STRINGIFY(x) STRINGIFY(x)
......
...@@ -239,25 +239,25 @@ ...@@ -239,25 +239,25 @@
NO_ALIASES()) \ NO_ALIASES()) \
X(Reg_xmm5, 5, "xmm5", Reg_xmm5, 1,0,0,0,0, 0,0,0,0,0, 1, 0,0,0,0,0, \ X(Reg_xmm5, 5, "xmm5", Reg_xmm5, 1,0,0,0,0, 0,0,0,0,0, 1, 0,0,0,0,0, \
NO_ALIASES()) \ NO_ALIASES()) \
X(Reg_xmm6, 6, "xmm6", Reg_xmm6, 1,0,0,0,0, 0,0,0,0,0, 1, 0,0,0,0,0, \ X(Reg_xmm6, 6, "xmm6", Reg_xmm6, 0,0,0,0,0, 0,0,0,0,0, 1, 0,0,0,0,0, \
NO_ALIASES()) \ NO_ALIASES()) \
X(Reg_xmm7, 7, "xmm7", Reg_xmm7, 1,0,0,0,0, 0,0,0,0,0, 1, 0,0,0,0,0, \ X(Reg_xmm7, 7, "xmm7", Reg_xmm7, 0,0,0,0,0, 0,0,0,0,0, 1, 0,0,0,0,0, \
NO_ALIASES()) \ NO_ALIASES()) \
X(Reg_xmm8, 8, "xmm8", Reg_xmm8, 1,0,0,0,0, 0,0,0,0,0, 1, 0,0,0,0,0, \ X(Reg_xmm8, 8, "xmm8", Reg_xmm8, 0,0,0,0,0, 0,0,0,0,0, 1, 0,0,0,0,0, \
NO_ALIASES()) \ NO_ALIASES()) \
X(Reg_xmm9, 9, "xmm9", Reg_xmm9, 1,0,0,0,0, 0,0,0,0,0, 1, 0,0,0,0,0, \ X(Reg_xmm9, 9, "xmm9", Reg_xmm9, 0,0,0,0,0, 0,0,0,0,0, 1, 0,0,0,0,0, \
NO_ALIASES()) \ NO_ALIASES()) \
X(Reg_xmm10, 10, "xmm10", Reg_xmm10, 1,0,0,0,0, 0,0,0,0,0, 1, 0,0,0,0,0, \ X(Reg_xmm10, 10, "xmm10", Reg_xmm10, 0,0,0,0,0, 0,0,0,0,0, 1, 0,0,0,0,0, \
NO_ALIASES()) \ NO_ALIASES()) \
X(Reg_xmm11, 11, "xmm11", Reg_xmm11, 1,0,0,0,0, 0,0,0,0,0, 1, 0,0,0,0,0, \ X(Reg_xmm11, 11, "xmm11", Reg_xmm11, 0,0,0,0,0, 0,0,0,0,0, 1, 0,0,0,0,0, \
NO_ALIASES()) \ NO_ALIASES()) \
X(Reg_xmm12, 12, "xmm12", Reg_xmm12, 1,0,0,0,0, 0,0,0,0,0, 1, 0,0,0,0,0, \ X(Reg_xmm12, 12, "xmm12", Reg_xmm12, 0,0,0,0,0, 0,0,0,0,0, 1, 0,0,0,0,0, \
NO_ALIASES()) \ NO_ALIASES()) \
X(Reg_xmm13, 13, "xmm13", Reg_xmm13, 1,0,0,0,0, 0,0,0,0,0, 1, 0,0,0,0,0, \ X(Reg_xmm13, 13, "xmm13", Reg_xmm13, 0,0,0,0,0, 0,0,0,0,0, 1, 0,0,0,0,0, \
NO_ALIASES()) \ NO_ALIASES()) \
X(Reg_xmm14, 14, "xmm14", Reg_xmm14, 1,0,0,0,0, 0,0,0,0,0, 1, 0,0,0,0,0, \ X(Reg_xmm14, 14, "xmm14", Reg_xmm14, 0,0,0,0,0, 0,0,0,0,0, 1, 0,0,0,0,0, \
NO_ALIASES()) \ NO_ALIASES()) \
X(Reg_xmm15, 15, "xmm15", Reg_xmm15, 1,0,0,0,0, 0,0,0,0,0, 1, 0,0,0,0,0, \ X(Reg_xmm15, 15, "xmm15", Reg_xmm15, 0,0,0,0,0, 0,0,0,0,0, 1, 0,0,0,0,0, \
NO_ALIASES()) \ NO_ALIASES()) \
/* End of xmm register set */ /* End of xmm register set */
//#define X(val, encode, name, base, scratch, preserved, stackptr, frameptr, //#define X(val, encode, name, base, scratch, preserved, stackptr, frameptr,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment