runtime: arm actually has 8-byte alignment

Specification:
https://developer.arm.com/documentation/dui0472/k/C-and-C---Implementation-Details/Basic-data-types-in-ARM-C-and-C--
There are multiple types that have an 8-byte alignment (long long,
double) so we need to use the same maximum alignment in TinyGo.

Fixing this is necessary for the precise GC.
This commit is contained in:
Ayke van Laethem
2022-12-20 17:13:33 +01:00
committed by Ayke
parent 38252e338f
commit 26b6d0b06d
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -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 {
+1 -1
View File
@@ -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 {