arch_amd64.mx raw
1 package runtime
2
3 const GOARCH = "amd64"
4
5 // The bitness of the CPU (e.g. 8, 32, 64).
6 const TargetBits = 64
7
8 const deferExtraRegs = 0
9
10 const callInstSize = 5 // "call someFunction" is 5 bytes
11
12 const (
13 linux_MAP_ANONYMOUS = 0x20
14 linux_SIGBUS = 7
15 linux_SIGILL = 4
16 linux_SIGSEGV = 11
17 )
18
19 // Align a pointer.
20 // Note that some amd64 instructions (like movaps) expect 16-byte aligned
21 // memory, thus the result must be 16-byte aligned.
22 func align(ptr uintptr) uintptr {
23 return (ptr + 15) &^ 15
24 }
25
26 func getCurrentStackPointer() uintptr {
27 return uintptr(stacksave())
28 }
29