From b6808a113294bda1d89969a5909c8935f454bf7b Mon Sep 17 00:00:00 2001 From: Wunkolo Date: Fri, 1 Dec 2023 21:42:56 -0800 Subject: [PATCH] common/aarch64: Allow generic code generator types Use the templated `BasicCodeGenerator` type rather than the specialized `CodeGenerator` type. Allows `VectorCodeGenerator` to work with these functions. --- src/common/aarch64/oaknut_abi.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/common/aarch64/oaknut_abi.h b/src/common/aarch64/oaknut_abi.h index 56bb8b5f3..ec28872aa 100644 --- a/src/common/aarch64/oaknut_abi.h +++ b/src/common/aarch64/oaknut_abi.h @@ -78,7 +78,8 @@ inline ABIFrameInfo ABI_CalculateFrameSize(std::bitset<64> regs, std::size_t fra return ABIFrameInfo{static_cast(total_size), static_cast(fprs_base_subtraction)}; } -inline void ABI_PushRegisters(oaknut::CodeGenerator& code, std::bitset<64> regs, +template +inline void ABI_PushRegisters(oaknut::BasicCodeGenerator& code, std::bitset<64> regs, std::size_t frame_size = 0) { using namespace oaknut; using namespace oaknut::util; @@ -137,7 +138,8 @@ inline void ABI_PushRegisters(oaknut::CodeGenerator& code, std::bitset<64> regs, } } -inline void ABI_PopRegisters(oaknut::CodeGenerator& code, std::bitset<64> regs, +template +inline void ABI_PopRegisters(oaknut::BasicCodeGenerator& code, std::bitset<64> regs, std::size_t frame_size = 0) { using namespace oaknut; using namespace oaknut::util;