From 3972263e732cdf09a701c88224be640db0a41a3e Mon Sep 17 00:00:00 2001 From: SachinVin Date: Sat, 23 Nov 2019 17:32:06 +0530 Subject: [PATCH] backend/A64/abi: Fix FP caller and callee save registers --- src/backend/A64/abi.h | 51 ++++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/src/backend/A64/abi.h b/src/backend/A64/abi.h index 141291d6..1bbff25a 100644 --- a/src/backend/A64/abi.h +++ b/src/backend/A64/abi.h @@ -23,7 +23,7 @@ constexpr HostLoc ABI_PARAM6 = HostLoc::X5; constexpr HostLoc ABI_PARAM7 = HostLoc::X6; constexpr HostLoc ABI_PARAM8 = HostLoc::X7; -constexpr std::array ABI_ALL_CALLER_SAVE = { +constexpr std::array ABI_ALL_CALLER_SAVE = { HostLoc::X0, HostLoc::X1, HostLoc::X2, @@ -52,31 +52,8 @@ constexpr std::array ABI_ALL_CALLER_SAVE = { HostLoc::Q5, HostLoc::Q6, HostLoc::Q7, - HostLoc::Q8, - HostLoc::Q9, - HostLoc::Q10, - HostLoc::Q11, - HostLoc::Q12, - HostLoc::Q13, - HostLoc::Q14, - HostLoc::Q15, + HostLoc::Q16, -}; - -constexpr std::array ABI_ALL_CALLEE_SAVE = { - HostLoc::X19, - HostLoc::X20, - HostLoc::X21, - HostLoc::X22, - HostLoc::X23, - HostLoc::X24, - HostLoc::X25, - HostLoc::X26, - HostLoc::X27, - HostLoc::X28, - HostLoc::X29, - HostLoc::X30, - HostLoc::Q17, HostLoc::Q18, HostLoc::Q19, @@ -94,6 +71,30 @@ constexpr std::array ABI_ALL_CALLEE_SAVE = { HostLoc::Q31, }; +constexpr std::array ABI_ALL_CALLEE_SAVE = { + HostLoc::X19, + HostLoc::X20, + HostLoc::X21, + HostLoc::X22, + HostLoc::X23, + HostLoc::X24, + HostLoc::X25, + HostLoc::X26, + HostLoc::X27, + HostLoc::X28, + HostLoc::X29, + HostLoc::X30, + + HostLoc::Q8, + HostLoc::Q9, + HostLoc::Q10, + HostLoc::Q11, + HostLoc::Q12, + HostLoc::Q13, + HostLoc::Q14, + HostLoc::Q15, +}; + constexpr size_t ABI_SHADOW_SPACE = 0; // bytes static_assert(ABI_ALL_CALLER_SAVE.size() + ABI_ALL_CALLEE_SAVE.size() == 63, "Invalid total number of registers");