From 62571fa649ebdff62f4c70f694371223d0f98115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciro=20Santilli=20=E5=85=AD=E5=9B=9B=E4=BA=8B=E4=BB=B6=20?= =?UTF-8?q?=E6=B3=95=E8=BD=AE=E5=8A=9F?= Date: Wed, 8 May 2019 00:00:05 +0000 Subject: [PATCH] aarch64: fix ASSERT_EQ_REG tests on gem5 Was doing an 8-byte aligned store, which gem5 dislikes. But the ARMARM says bad things may happen there, notably a signal: "D1.8.2 SP alignment checking" so gem5 is not really too wrong, QEMU just happens to work by chance. --- userland/arch/aarch64/common_arch.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/userland/arch/aarch64/common_arch.h b/userland/arch/aarch64/common_arch.h index 9f70dc4..84c3140 100644 --- a/userland/arch/aarch64/common_arch.h +++ b/userland/arch/aarch64/common_arch.h @@ -16,9 +16,9 @@ ; #define ASSERT_EQ_REG(reg1, reg2) \ - str reg2, [sp, -8]!; \ + str reg2, [sp, -16]!; \ mov x0, reg1; \ - ldr x1, [sp], 8; \ + ldr x1, [sp], 16; \ ASSERT_EQ_DO(64); \ ;