aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2022-12-15 18:31:11 +0100
committerAyke <[email protected]>2023-01-17 19:32:18 +0100
commit38252e338fc29c2335f960713a8f38767908f1cc (patch)
tree3cc0478b2c0b76d9a543362f7576bd22bdfe2bae
parente7ba07dd5ad1760feaf392e788c0754bdc1a9e8c (diff)
downloadtinygo-38252e338fc29c2335f960713a8f38767908f1cc.tar.gz
tinygo-38252e338fc29c2335f960713a8f38767908f1cc.zip
runtime: arm64 actually has 16-byte alignment like amd64
Proof: https://godbolt.org/z/as4EM3713 Essentially, this means that there are objects on arm64 that have a 16-byte alignment and so we have to respect that when we allocate things on the heap.
-rw-r--r--src/runtime/arch_arm64.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/arch_arm64.go b/src/runtime/arch_arm64.go
index 373be8840..a481fb1ad 100644
--- a/src/runtime/arch_arm64.go
+++ b/src/runtime/arch_arm64.go
@@ -9,7 +9,7 @@ const deferExtraRegs = 0
// Align on word boundary.
func align(ptr uintptr) uintptr {
- return (ptr + 7) &^ 7
+ return (ptr + 15) &^ 15
}
func getCurrentStackPointer() uintptr {