Implement thumb1_ADD_reg_t1 and thumb1_ADD_reg_t2

This commit is contained in:
MerryMage 2016-07-08 17:09:18 +08:00
parent e93fb0ba2b
commit d0b48bfb59
9 changed files with 144 additions and 6 deletions

View file

@ -100,6 +100,15 @@ private:
intptr_t tag;
};
/// Representation of a u1 immediate.
class ImmU1 final : public Value {
public:
explicit ImmU1(bool value_) : Value(Opcode::ImmU1), value(value_) {}
~ImmU1() override = default;
const bool value; ///< Literal value to load
};
/// Representation of a u8 immediate.
class ImmU8 final : public Value {
public:

View file

@ -20,6 +20,7 @@ OPCODE(SetVFlag, T::Void, T::U1
// Pseudo-operation, handled specially at final emit
OPCODE(GetCarryFromOp, T::U1, T::U32 )
OPCODE(GetOverflowFromOp, T::U1, T::U32 )
// Calculations
OPCODE(LeastSignificantByte, T::U8, T::U32 )
@ -28,3 +29,4 @@ OPCODE(IsZero, T::U1, T::U32
OPCODE(LogicalShiftLeft, T::U32, T::U32, T::U8, T::U1 )
OPCODE(LogicalShiftRight, T::U32, T::U32, T::U8, T::U1 )
OPCODE(ArithmeticShiftRight, T::U32, T::U32, T::U8, T::U1 )
OPCODE(AddWithCarry, T::U32, T::U32, T::U32, T::U1 )