Skip to content

Commit f7a14e0

Browse files
committed
rt: don't save and restore xmm/regs in __morestack.
1 parent f54adca commit f7a14e0

File tree

1 file changed

+3
-19
lines changed

1 file changed

+3
-19
lines changed

src/rt/arch/x86_64/morestack.S

+3-19
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ MORESTACK:
4949
// Calculate the CFA as on offset from %ebp
5050
.cfi_def_cfa_register %rbp
5151

52-
subq $184, %rsp
52+
subq $56, %rsp
5353

5454
// Save argument registers of the original function
5555
movq %rdi, (%rsp)
@@ -58,14 +58,6 @@ MORESTACK:
5858
movq %rcx, 24(%rsp)
5959
movq %r8, 32(%rsp)
6060
movq %r9, 40(%rsp)
61-
movdqa %xmm0, 48(%rsp)
62-
movdqa %xmm1, 64(%rsp)
63-
movdqa %xmm2, 80(%rsp)
64-
movdqa %xmm3, 96(%rsp)
65-
movdqa %xmm4, 112(%rsp)
66-
movdqa %xmm5, 128(%rsp)
67-
movdqa %xmm6, 144(%rsp)
68-
movdqa %xmm7, 160(%rsp)
6961

7062
// Calculate the address of the stack arguments.
7163
// We have the base pointer, __morestack's return address,
@@ -96,16 +88,8 @@ MORESTACK:
9688
movq 24(%rsp), %rcx
9789
movq 32(%rsp), %r8
9890
movq 40(%rsp), %r9
99-
movdqa 48(%rsp), %xmm0
100-
movdqa 64(%rsp), %xmm1
101-
movdqa 80(%rsp), %xmm2
102-
movdqa 96(%rsp), %xmm3
103-
movdqa 112(%rsp), %xmm4
104-
movdqa 128(%rsp), %xmm5
105-
movdqa 144(%rsp), %xmm6
106-
movdqa 160(%rsp), %xmm7
107-
108-
addq $184, %rsp
91+
92+
addq $56, %rsp
10993

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

0 commit comments

Comments
 (0)