20 template <
typename TArg0>
23 const auto n = ictx.cpua.ReadRegister(rn.Get());
24 auto apsr = ictx.cpua.template ReadSpecialRegister<SpecialRegisterId::kApsr>();
25 const auto result = Alu32::AND(n, imm_carry.out);
28 OpResult{result, imm_carry.carry_out, (apsr & ApsrRegister::kVMsk) == ApsrRegister::kVMsk};
30 PostExecSetFlags::Call(ictx, op_res);
31 PostExecAdvancePcAndIt::Call(ictx, iflags);
32 return Ok(kNoInstrExecFlags);
43 template <
typename TArg0>
46 const auto n = ictx.cpua.ReadRegister(rn.Get());
47 auto apsr = ictx.cpua.template ReadSpecialRegister<SpecialRegisterId::kApsr>();
48 const auto result = Alu32::EOR(n, imm_carry.out);
51 OpResult{result, imm_carry.carry_out, (apsr & ApsrRegister::kVMsk) == ApsrRegister::kVMsk};
53 PostExecSetFlags::Call(ictx, op_res);
54 PostExecAdvancePcAndIt::Call(ictx, iflags);
55 return Ok(kNoInstrExecFlags);
59template <
typename TOp,
typename TInstrContext>
class BinaryNullInstrWithImmCarry {
61 using It =
typename TInstrContext::It;
62 using Pc =
typename TInstrContext::Pc;
64 template <
typename TArg0>
68 if (!condition_passed) {
69 PostExecAdvancePcAndIt::Call(ictx, iflags);
81 BinaryNullInstrWithImmCarry() =
delete;
86 ~BinaryNullInstrWithImmCarry() =
delete;
92 BinaryNullInstrWithImmCarry(
const BinaryNullInstrWithImmCarry &r_src) =
delete;
98 BinaryNullInstrWithImmCarry &operator=(
const BinaryNullInstrWithImmCarry &r_src) =
delete;
104 BinaryNullInstrWithImmCarry(BinaryNullInstrWithImmCarry &&r_src) =
delete;
110 BinaryNullInstrWithImmCarry &operator=(BinaryNullInstrWithImmCarry &&r_src) =
delete;
#define TRY_ASSIGN(NAME, OUT_TYPE, CALL)
Try to assign a value to a variable and return an error if the assignment fails.
Definition result.h:123