Skip to content

Commit 2a86485

Browse files
committed
auto merge of #5418 : luqmana/rust/stack-float, r=brson
Like I commented in #2043, I can't reproduce the weirdness from #1388 on either mac or linux (x84_64) and pushing to try gives all green. That's 128 less bytes to have to keep in the stack for every call to __morestack.
2 parents b329f2f + f7a14e0 commit 2a86485

File tree

1 file changed

+3
-19
lines changed

1 file changed

+3
-19
lines changed

src/rt/arch/x86_64/morestack.S

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ MORESTACK:
5454
// Calculate the CFA as on offset from %ebp
5555
.cfi_def_cfa_register %rbp
5656

57-
subq $184, %rsp
57+
subq $56, %rsp
5858

5959
// Save argument registers of the original function
6060
movq %rdi, (%rsp)
@@ -63,14 +63,6 @@ MORESTACK:
6363
movq %rcx, 24(%rsp)
6464
movq %r8, 32(%rsp)
6565
movq %r9, 40(%rsp)
66-
movdqa %xmm0, 48(%rsp)
67-
movdqa %xmm1, 64(%rsp)
68-
movdqa %xmm2, 80(%rsp)
69-
movdqa %xmm3, 96(%rsp)
70-
movdqa %xmm4, 112(%rsp)
71-
movdqa %xmm5, 128(%rsp)
72-
movdqa %xmm6, 144(%rsp)
73-
movdqa %xmm7, 160(%rsp)
7466

7567
// Calculate the address of the stack arguments.
7668
// We have the base pointer, __morestack's return address,
@@ -101,16 +93,8 @@ MORESTACK:
10193
movq 24(%rsp), %rcx
10294
movq 32(%rsp), %r8
10395
movq 40(%rsp), %r9
104-
movdqa 48(%rsp), %xmm0
105-
movdqa 64(%rsp), %xmm1
106-
movdqa 80(%rsp), %xmm2
107-
movdqa 96(%rsp), %xmm3
108-
movdqa 112(%rsp), %xmm4
109-
movdqa 128(%rsp), %xmm5
110-
movdqa 144(%rsp), %xmm6
111-
movdqa 160(%rsp), %xmm7
112-
113-
addq $184, %rsp
96+
97+
addq $56, %rsp
11498

11599
movq 8(%rbp),%r10 // Grab the return pointer.
116100
incq %r10 // Skip past the `ret` in our parent frame

0 commit comments

Comments
 (0)