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-04 12:35:47 -0400
commit9cf1f91b03ac5ae16b714f9190c92093a85cccce (patch)
treec2e86ef3d97aeac393818a04b51e95d372bdd0ed
parente04e3d812a2fc75cf198dfa8578eb95fc35a03fa (diff)
downloadhaskell-9cf1f91b03ac5ae16b714f9190c92093a85cccce.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 92b0696c2b..fe6dc06a11 100644
--- a/rts/StgCRun.c
+++ b/rts/StgCRun.c
@@ -489,15 +489,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"