We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 82cb906 commit fefae72Copy full SHA for fefae72
src/rt/arch/x86_64/context.h
@@ -21,21 +21,18 @@ T align_down(T sp)
21
// The struct in which we store the saved data. This is mostly the
22
// volatile registers and instruction pointer, but it also includes
23
// RCX/RDI which are used to pass arguments. The indices for each
24
-// register are found in "regs.h":
+// register are found in "regs.h". Note that the alignment must be
25
+// 16 bytes so that SSE instructions can be used.
26
#include "regs.h"
27
struct registers_t {
28
uint64_t data[RUSTRT_MAX];
-};
29
+} __attribute__((aligned(16)));
30
31
extern "C" void __morestack(void *args, void *fn_ptr, uintptr_t stack_ptr);
32
33
class context {
34
public:
-#ifdef __FreeBSD__
35
- registers_t regs __attribute__((aligned(16)));
36
-#else
37
registers_t regs;
38
-#endif
39
40
context();
41
0 commit comments