File tree 2 files changed +30
-1
lines changed
2 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -150,6 +150,9 @@ MORESTACK:
150
150
movl %ecx , 16 (%esp )
151
151
movl %edx , 12 (%esp )
152
152
153
+ // FIXME (1388): it's possible we also need to save/restore some
154
+ // SSE2 registers here, if floats-go-in-regs on x86+SSE2. Unclear.
155
+
153
156
// FIXME (1226): main is compiled with the split-stack prologue,
154
157
// causing it to call __morestack, so we have to jump back out
155
158
calll RUST_GET_TASK
Original file line number Diff line number Diff line change @@ -61,6 +61,19 @@ MORESTACK:
61
61
pushq %r8
62
62
pushq %r9
63
63
64
+ pushq $0 // Alignment
65
+ pushq $0 // Alignment
66
+
67
+ subq $128 , %rsp
68
+ movdqa %xmm0 , (%rsp )
69
+ movdqa %xmm1 , 16 (%rsp )
70
+ movdqa %xmm2 , 32 (%rsp )
71
+ movdqa %xmm3 , 48 (%rsp )
72
+ movdqa %xmm4 , 64 (%rsp )
73
+ movdqa %xmm5 , 80 (%rsp )
74
+ movdqa %xmm6 , 96 (%rsp )
75
+ movdqa %xmm7 , 112 (%rsp )
76
+
64
77
// Calculate the address of the stack arguments.
65
78
// We have the base pointer, __morestack's return address,
66
79
// and __morestack's caller's return address to skip
@@ -72,7 +85,7 @@ MORESTACK:
72
85
movq %r11 , %rdx // Size of stack arguments
73
86
movq %rax , %rsi // Address of stack arguments
74
87
movq %r10 , %rdi // The amount of stack needed
75
-
88
+
76
89
#ifdef __APPLE__
77
90
call UPCALL_NEW_STACK
78
91
#endif
@@ -81,6 +94,19 @@ MORESTACK:
81
94
#endif
82
95
83
96
// Pop the saved arguments
97
+ movdqa (%rsp ), %xmm0
98
+ movdqa 16 (%rsp ), %xmm1
99
+ movdqa 32 (%rsp ), %xmm2
100
+ movdqa 48 (%rsp ), %xmm3
101
+ movdqa 64 (%rsp ), %xmm4
102
+ movdqa 80 (%rsp ), %xmm5
103
+ movdqa 96 (%rsp ), %xmm6
104
+ movdqa 112 (%rsp ), %xmm7
105
+ addq $128 , %rsp
106
+
107
+ popq %r9 // Alignment
108
+ popq %r9 // Alignment
109
+
84
110
popq %r9
85
111
popq %r8
86
112
popq %rcx
You can’t perform that action at this time.
0 commit comments