diff --git a/src/arch/arm/aapcs32.hh b/src/arch/arm/aapcs32.hh index a0f09b87b6..a1345bd571 100644 --- a/src/arch/arm/aapcs32.hh +++ b/src/arch/arm/aapcs32.hh @@ -160,9 +160,7 @@ struct Result::value) { - tc->setIntReg(ArmISA::INTREG_R0, (uint32_t)i); - } else if (ArmISA::byteOrder(tc) == ByteOrder::little) { + if (ArmISA::byteOrder(tc) == ByteOrder::little) { tc->setIntReg(ArmISA::INTREG_R0, (uint32_t)(i >> 0)); tc->setIntReg(ArmISA::INTREG_R1, (uint32_t)(i >> 32)); } else { @@ -199,11 +197,6 @@ struct Argument::value && - state.ncrn <= state.MAX_CRN) { - return tc->readIntReg(state.ncrn++); - } - if (alignof(Integer) == 8 && (state.ncrn % 2)) state.ncrn++; diff --git a/src/arch/arm/reg_abi.hh b/src/arch/arm/reg_abi.hh index eb87eff776..94dea18cf0 100644 --- a/src/arch/arm/reg_abi.hh +++ b/src/arch/arm/reg_abi.hh @@ -55,6 +55,7 @@ template struct Argument::value && + std::is_integral::value && ABI::template IsWide::value>> { static Arg diff --git a/src/arch/sparc/se_workload.hh b/src/arch/sparc/se_workload.hh index e39261dc5a..7303010d88 100644 --- a/src/arch/sparc/se_workload.hh +++ b/src/arch/sparc/se_workload.hh @@ -105,6 +105,7 @@ struct Result struct Argument::value && SparcISA::SEWorkload::SyscallABI32::IsWide::value>> { using ABI = SparcISA::SEWorkload::SyscallABI32; diff --git a/src/arch/x86/linux/se_workload.hh b/src/arch/x86/linux/se_workload.hh index c1cd2341a0..cd26e04f46 100644 --- a/src/arch/x86/linux/se_workload.hh +++ b/src/arch/x86/linux/se_workload.hh @@ -93,7 +93,7 @@ namespace GuestABI template struct Argument::value && X86ISA::EmuLinux::SyscallABI32::IsWide::value>> { using ABI = X86ISA::EmuLinux::SyscallABI32; diff --git a/src/sim/syscall_abi.hh b/src/sim/syscall_abi.hh index 9d552028f8..a60af425f8 100644 --- a/src/sim/syscall_abi.hh +++ b/src/sim/syscall_abi.hh @@ -36,18 +36,6 @@ class SyscallDesc; -namespace GuestABI -{ - -// Does this normally 64 bit data type shrink down to 32 bits for 32 bit ABIs? -template -struct IsConforming : public std::false_type {}; - -template <> -struct IsConforming : public std::true_type {}; - -} // namespace GuestABI - struct GenericSyscallABI { using State = int; @@ -64,25 +52,12 @@ struct GenericSyscallABI32 : public GenericSyscallABI // Is this argument too big for a single register? template - struct IsWide; + struct IsWide : public std::false_type {}; template - struct IsWide::value && - (sizeof(T) <= sizeof(UintPtr) || - GuestABI::IsConforming::value)>> - { - static const bool value = false; - }; - - template - struct IsWide::value && - (sizeof(T) > sizeof(UintPtr)) && - !GuestABI::IsConforming::value>> - { - static const bool value = true; - }; + struct IsWide sizeof(UintPtr))>> : + public std::true_type + {}; // Read two registers and merge them into one value. static uint64_t @@ -117,7 +92,8 @@ struct Argument struct Argument::value>> + typename std::enable_if_t::value && + !ABI::template IsWide::value>> { static Arg get(ThreadContext *tc, typename ABI::State &state)