diff --git a/src/runtime/arch_arm.go b/src/runtime/arch_arm.go index 16d3649b..1868b7eb 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 613dfd5f..45134405 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 {