aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/runtime/arch_arm.go4
-rw-r--r--src/runtime/arch_cortexm.go2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/runtime/arch_arm.go b/src/runtime/arch_arm.go
index 16d3649bb..1868b7ebd 100644
--- a/src/runtime/arch_arm.go
+++ b/src/runtime/arch_arm.go
@@ -9,9 +9,9 @@ const TargetBits = 32
const deferExtraRegs = 0
-// Align on word boundary.
+// Align on the maximum alignment for this platform (double).
func align(ptr uintptr) uintptr {
- return (ptr + 3) &^ 3
+ return (ptr + 7) &^ 7
}
func getCurrentStackPointer() uintptr {
diff --git a/src/runtime/arch_cortexm.go b/src/runtime/arch_cortexm.go
index 613dfd5fc..45134405c 100644
--- a/src/runtime/arch_cortexm.go
+++ b/src/runtime/arch_cortexm.go
@@ -15,7 +15,7 @@ const deferExtraRegs = 0
// Align on word boundary.
func align(ptr uintptr) uintptr {
- return (ptr + 3) &^ 3
+ return (ptr + 7) &^ 7
}
func getCurrentStackPointer() uintptr {