summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorklebinger.andreas@gmx.at <klebinger.andreas@gmx.at>2019-04-01 16:17:41 +0200
committerBen Gamari <ben@smart-cactus.org>2019-04-17 10:57:23 -0400
commitcb9c0f21befa040f23393bc338a4ae94a6a0e31e (patch)
treea75c854369c807e9b872e4fc7681a9f2a1eecbc9
parent6e254ee34e2e259639ffea7accc0e651c4319791 (diff)
downloadhaskell-cb9c0f21befa040f23393bc338a4ae94a6a0e31e.tar.gz
Restore Xmm registers properly in StgCRun.c
This fixes #16514: Xmm6-15 was restored based off rax instead of rsp. The code was introduced in the fix for #14619. (cherry picked from commit 9b131500371a07626e33edc56700c12322364560)
-rw-r--r--rts/StgCRun.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/rts/StgCRun.c b/rts/StgCRun.c
index 1b0a8f2d70..934926e0f3 100644
--- a/rts/StgCRun.c
+++ b/rts/StgCRun.c
@@ -494,15 +494,15 @@ StgRunIsImplementedInAssembler(void)
"movq 48(%%rsp),%%rdi\n\t"
"movq 56(%%rsp),%%rsi\n\t"
"movq 64(%%rsp),%%xmm6\n\t"
- "movq 72(%%rax),%%xmm7\n\t"
- "movq 80(%%rax),%%xmm8\n\t"
- "movq 88(%%rax),%%xmm9\n\t"
- "movq 96(%%rax),%%xmm10\n\t"
- "movq 104(%%rax),%%xmm11\n\t"
- "movq 112(%%rax),%%xmm12\n\t"
- "movq 120(%%rax),%%xmm13\n\t"
- "movq 128(%%rax),%%xmm14\n\t"
- "movq 136(%%rax),%%xmm15\n\t"
+ "movq 72(%%rsp),%%xmm7\n\t"
+ "movq 80(%%rsp),%%xmm8\n\t"
+ "movq 88(%%rsp),%%xmm9\n\t"
+ "movq 96(%%rsp),%%xmm10\n\t"
+ "movq 104(%%rsp),%%xmm11\n\t"
+ "movq 112(%%rsp),%%xmm12\n\t"
+ "movq 120(%%rsp),%%xmm13\n\t"
+ "movq 128(%%rsp),%%xmm14\n\t"
+ "movq 136(%%rsp),%%xmm15\n\t"
#endif
"addq %1, %%rsp\n\t"
"retq"