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.
Этот коммит содержится в:
Ayke van Laethem 2022-12-20 17:13:33 +01:00 коммит произвёл Ayke
родитель 38252e338f
коммит 26b6d0b06d
2 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -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 {

Просмотреть файл

@ -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 {