// opcode name, return type, arg1 type, arg2 type, arg3 type, ... OPCODE(Identity, T::Opaque, T::Opaque ) OPCODE(Breakpoint, T::Void, ) // ARM Context getters/setters OPCODE(GetRegister, T::U32, T::RegRef ) OPCODE(GetExtendedRegister32, T::F32, T::ExtRegRef ) OPCODE(GetExtendedRegister64, T::F64, T::ExtRegRef ) OPCODE(SetRegister, T::Void, T::RegRef, T::U32 ) OPCODE(SetExtendedRegister32, T::Void, T::ExtRegRef, T::F32 ) OPCODE(SetExtendedRegister64, T::Void, T::ExtRegRef, T::F64 ) OPCODE(GetCpsr, T::U32, ) OPCODE(SetCpsr, T::Void, T::U32 ) OPCODE(GetNFlag, T::U1, ) OPCODE(SetNFlag, T::Void, T::U1 ) OPCODE(GetZFlag, T::U1, ) OPCODE(SetZFlag, T::Void, T::U1 ) OPCODE(GetCFlag, T::U1, ) OPCODE(SetCFlag, T::Void, T::U1 ) OPCODE(GetVFlag, T::U1, ) OPCODE(SetVFlag, T::Void, T::U1 ) OPCODE(OrQFlag, T::Void, T::U1 ) OPCODE(GetGEFlags, T::U32, ) OPCODE(SetGEFlags, T::Void, T::U32 ) OPCODE(BXWritePC, T::Void, T::U32 ) OPCODE(CallSupervisor, T::Void, T::U32 ) OPCODE(GetFpscr, T::U32, ) OPCODE(SetFpscr, T::Void, T::U32, ) OPCODE(GetFpscrNZCV, T::U32, ) OPCODE(SetFpscrNZCV, T::Void, T::U32, ) // Hints OPCODE(PushRSB, T::Void, T::U64 ) // Pseudo-operation, handled specially at final emit OPCODE(GetCarryFromOp, T::U1, T::U32 ) OPCODE(GetOverflowFromOp, T::U1, T::U32 ) OPCODE(GetGEFromOp, T::U32, T::U32 ) // Calculations OPCODE(Pack2x32To1x64, T::U64, T::U32, T::U32 ) OPCODE(LeastSignificantWord, T::U32, T::U64 ) OPCODE(MostSignificantWord, T::U32, T::U64 ) OPCODE(LeastSignificantHalf, T::U16, T::U32 ) OPCODE(LeastSignificantByte, T::U8, T::U32 ) OPCODE(MostSignificantBit, T::U1, T::U32 ) OPCODE(IsZero, T::U1, T::U32 ) OPCODE(IsZero64, T::U1, T::U64 ) OPCODE(LogicalShiftLeft, T::U32, T::U32, T::U8, T::U1 ) OPCODE(LogicalShiftRight, T::U32, T::U32, T::U8, T::U1 ) OPCODE(LogicalShiftRight64, T::U64, T::U64, T::U8 ) OPCODE(ArithmeticShiftRight, T::U32, T::U32, T::U8, T::U1 ) OPCODE(RotateRight, T::U32, T::U32, T::U8, T::U1 ) OPCODE(RotateRightExtended, T::U32, T::U32, T::U1 ) OPCODE(AddWithCarry, T::U32, T::U32, T::U32, T::U1 ) OPCODE(SubWithCarry, T::U32, T::U32, T::U32, T::U1 ) OPCODE(Add64, T::U64, T::U64, T::U64 ) OPCODE(Sub64, T::U64, T::U64, T::U64 ) OPCODE(Mul, T::U32, T::U32, T::U32 ) OPCODE(Mul64, T::U64, T::U64, T::U64 ) OPCODE(And, T::U32, T::U32, T::U32 ) OPCODE(Eor, T::U32, T::U32, T::U32 ) OPCODE(Or, T::U32, T::U32, T::U32 ) OPCODE(Not, T::U32, T::U32 ) OPCODE(SignExtendWordToLong, T::U64, T::U32 ) OPCODE(SignExtendHalfToWord, T::U32, T::U16 ) OPCODE(SignExtendByteToWord, T::U32, T::U8 ) OPCODE(ZeroExtendWordToLong, T::U64, T::U32 ) OPCODE(ZeroExtendHalfToWord, T::U32, T::U16 ) OPCODE(ZeroExtendByteToWord, T::U32, T::U8 ) OPCODE(ByteReverseWord, T::U32, T::U32 ) OPCODE(ByteReverseHalf, T::U16, T::U16 ) OPCODE(ByteReverseDual, T::U64, T::U64 ) OPCODE(CountLeadingZeros, T::U32, T::U32 ) OPCODE(NegateLowWord, T::U32, T::U32 ) OPCODE(NegateHighWord, T::U32, T::U32 ) // Saturated instructions OPCODE(SignedSaturatedAdd, T::U32, T::U32, T::U32 ) OPCODE(SignedSaturatedSub, T::U32, T::U32, T::U32 ) OPCODE(UnsignedSaturation, T::U32, T::U32, T::U8 ) OPCODE(SignedSaturation, T::U32, T::U32, T::U8 ) // Packed instructions OPCODE(PackedAddU8, T::U32, T::U32, T::U32 ) OPCODE(PackedAddS8, T::U32, T::U32, T::U32 ) OPCODE(PackedSubU8, T::U32, T::U32, T::U32 ) OPCODE(PackedSubS8, T::U32, T::U32, T::U32 ) OPCODE(PackedAddU16, T::U32, T::U32, T::U32 ) OPCODE(PackedAddS16, T::U32, T::U32, T::U32 ) OPCODE(PackedSubU16, T::U32, T::U32, T::U32 ) OPCODE(PackedSubS16, T::U32, T::U32, T::U32 ) OPCODE(PackedHalvingAddU8, T::U32, T::U32, T::U32 ) OPCODE(PackedHalvingAddS8, T::U32, T::U32, T::U32 ) OPCODE(PackedHalvingSubU8, T::U32, T::U32, T::U32 ) OPCODE(PackedHalvingAddU16, T::U32, T::U32, T::U32 ) OPCODE(PackedHalvingAddS16, T::U32, T::U32, T::U32 ) OPCODE(PackedHalvingSubU16, T::U32, T::U32, T::U32 ) OPCODE(PackedSaturatedAddU8, T::U32, T::U32, T::U32 ) OPCODE(PackedSaturatedAddS8, T::U32, T::U32, T::U32 ) OPCODE(PackedSaturatedSubU8, T::U32, T::U32, T::U32 ) OPCODE(PackedSaturatedSubS8, T::U32, T::U32, T::U32 ) OPCODE(PackedSaturatedAddU16, T::U32, T::U32, T::U32 ) OPCODE(PackedSaturatedAddS16, T::U32, T::U32, T::U32 ) OPCODE(PackedSaturatedSubU16, T::U32, T::U32, T::U32 ) OPCODE(PackedSaturatedSubS16, T::U32, T::U32, T::U32 ) OPCODE(PackedAbsDiffSumS8, T::U32, T::U32, T::U32 ) // Floating-point operations OPCODE(TransferToFP32, T::F32, T::U32 ) OPCODE(TransferToFP64, T::F64, T::U64 ) OPCODE(TransferFromFP32, T::U32, T::F32 ) OPCODE(TransferFromFP64, T::U64, T::F64 ) OPCODE(FPAbs32, T::F32, T::F32 ) OPCODE(FPAbs64, T::F64, T::F64 ) OPCODE(FPAdd32, T::F32, T::F32, T::F32 ) OPCODE(FPAdd64, T::F64, T::F64, T::F64 ) OPCODE(FPCompare32, T::Void, T::F32, T::F32, T::U1 ) OPCODE(FPCompare64, T::Void, T::F64, T::F64, T::U1 ) OPCODE(FPDiv32, T::F32, T::F32, T::F32 ) OPCODE(FPDiv64, T::F64, T::F64, T::F64 ) OPCODE(FPMul32, T::F32, T::F32, T::F32 ) OPCODE(FPMul64, T::F64, T::F64, T::F64 ) OPCODE(FPNeg32, T::F32, T::F32 ) OPCODE(FPNeg64, T::F64, T::F64 ) OPCODE(FPSqrt32, T::F32, T::F32 ) OPCODE(FPSqrt64, T::F64, T::F64 ) OPCODE(FPSub32, T::F32, T::F32, T::F32 ) OPCODE(FPSub64, T::F64, T::F64, T::F64 ) // Floating-point conversions OPCODE(FPSingleToDouble, T::F64, T::F32 ) OPCODE(FPDoubleToSingle, T::F32, T::F64 ) OPCODE(FPSingleToU32, T::F32, T::F32, T::U1 ) OPCODE(FPSingleToS32, T::F32, T::F32, T::U1 ) OPCODE(FPDoubleToU32, T::F32, T::F64, T::U1 ) OPCODE(FPDoubleToS32, T::F32, T::F64, T::U1 ) OPCODE(FPU32ToSingle, T::F32, T::F32, T::U1 ) OPCODE(FPS32ToSingle, T::F32, T::F32, T::U1 ) OPCODE(FPU32ToDouble, T::F64, T::F32, T::U1 ) OPCODE(FPS32ToDouble, T::F64, T::F32, T::U1 ) // Memory access OPCODE(ClearExclusive, T::Void, ) OPCODE(SetExclusive, T::Void, T::U32, T::U8 ) OPCODE(ReadMemory8, T::U8, T::U32 ) OPCODE(ReadMemory16, T::U16, T::U32 ) OPCODE(ReadMemory32, T::U32, T::U32 ) OPCODE(ReadMemory64, T::U64, T::U32 ) OPCODE(WriteMemory8, T::Void, T::U32, T::U8 ) OPCODE(WriteMemory16, T::Void, T::U32, T::U16 ) OPCODE(WriteMemory32, T::Void, T::U32, T::U32 ) OPCODE(WriteMemory64, T::Void, T::U32, T::U64 ) OPCODE(ExclusiveWriteMemory8, T::U32, T::U32, T::U8 ) OPCODE(ExclusiveWriteMemory16, T::U32, T::U32, T::U16 ) OPCODE(ExclusiveWriteMemory32, T::U32, T::U32, T::U32 ) OPCODE(ExclusiveWriteMemory64, T::U32, T::U32, T::U32, T::U32 )