#include "arch/arm/htm.hh"
#include "arch/arm/isa_traits.hh"
#include "arch/arm/pauth_helpers.hh"
+#include "arch/arm/reg_abi.hh"
#include "arch/arm/semihosting.hh"
#include "arch/arm/utility.hh"
#include "arch/generic/memhelpers.hh"
let {{
gem5OpCode = '''
uint64_t ret;
- bool recognized = PseudoInst::pseudoInst<PseudoInstABI>(
- xc->tcBase(), bits(machInst, 23, 16), ret);
- if (!recognized)
+ int func = bits(machInst, 23, 16);
+ auto *tc = xc->tcBase();
+ if (!PseudoInst::pseudoInst<%s>(tc, func, ret))
fault = std::make_shared<UndefinedInstruction>(machInst, true);
'''
gem5OpIop = ArmInstObjParams("gem5op", "Gem5Op64", "PredOp",
- { "code": gem5OpCode + 'X0 = ret;',
+ { "code": gem5OpCode % "RegABI64" +
+ 'X0 = ret;',
"predicate_test": predicateTest },
[ "IsNonSpeculative", "IsUnverifiable" ]);
header_output += BasicDeclare.subst(gem5OpIop)
exec_output += PredOpExecute.subst(gem5OpIop)
gem5OpIop = ArmInstObjParams("gem5op", "Gem5Op", "PredOp",
- { "code": gem5OpCode + \
+ { "code": gem5OpCode % "RegABI32" + \
'R0 = bits(ret, 31, 0);\n' + \
'R1 = bits(ret, 63, 32);',
"predicate_test": predicateTest },
#include "arch/arm/faults.hh"
#include "arch/arm/isa.hh"
#include "arch/arm/pagetable.hh"
+#include "arch/arm/reg_abi.hh"
#include "arch/arm/self_debug.hh"
#include "arch/arm/stage2_lookup.hh"
#include "arch/arm/stage2_mmu.hh"
[func, mode](ThreadContext *tc, PacketPtr pkt) -> Cycles
{
uint64_t ret;
- PseudoInst::pseudoInst<PseudoInstABI>(tc, func, ret);
+ if (inAArch64(tc))
+ PseudoInst::pseudoInst<RegABI64>(tc, func, ret);
+ else
+ PseudoInst::pseudoInst<RegABI32>(tc, func, ret);
+
if (mode == Read)
pkt->setLE(ret);
+
return Cycles(1);
}
);