2016-07-01 14:01:06 +01:00
|
|
|
// opcode name, return type, arg1 type, arg2 type, arg3 type, ...
|
|
|
|
|
2016-08-02 11:51:05 +01:00
|
|
|
OPCODE(Identity, T::Opaque, T::Opaque )
|
2016-08-05 14:07:27 +01:00
|
|
|
OPCODE(Breakpoint, T::Void, )
|
2016-08-02 11:51:05 +01:00
|
|
|
|
2016-07-01 14:01:06 +01:00
|
|
|
// ARM Context getters/setters
|
|
|
|
OPCODE(GetRegister, T::U32, T::RegRef )
|
2016-08-05 18:54:19 +01:00
|
|
|
OPCODE(GetExtendedRegister32, T::F32, T::ExtRegRef )
|
|
|
|
OPCODE(GetExtendedRegister64, T::F64, T::ExtRegRef )
|
2016-07-01 14:01:06 +01:00
|
|
|
OPCODE(SetRegister, T::Void, T::RegRef, T::U32 )
|
2016-08-05 18:54:19 +01:00
|
|
|
OPCODE(SetExtendedRegister32, T::Void, T::ExtRegRef, T::F32 )
|
|
|
|
OPCODE(SetExtendedRegister64, T::Void, T::ExtRegRef, T::F64 )
|
2016-07-01 14:01:06 +01:00
|
|
|
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 )
|
2016-08-06 22:04:52 +01:00
|
|
|
OPCODE(OrQFlag, T::Void, T::U1 )
|
2016-07-12 10:58:14 +01:00
|
|
|
OPCODE(BXWritePC, T::Void, T::U32 )
|
2016-07-14 14:04:43 +01:00
|
|
|
OPCODE(CallSupervisor, T::Void, T::U32 )
|
2016-07-01 14:01:06 +01:00
|
|
|
|
|
|
|
// Pseudo-operation, handled specially at final emit
|
|
|
|
OPCODE(GetCarryFromOp, T::U1, T::U32 )
|
2016-07-08 10:09:18 +01:00
|
|
|
OPCODE(GetOverflowFromOp, T::U1, T::U32 )
|
2016-07-01 14:01:06 +01:00
|
|
|
|
|
|
|
// Calculations
|
2016-08-04 22:04:42 +01:00
|
|
|
OPCODE(Pack2x32To1x64, T::U64, T::U32, T::U32 )
|
|
|
|
OPCODE(LeastSignificantWord, T::U32, T::U64 )
|
|
|
|
OPCODE(MostSignificantWord, T::U32, T::U64 )
|
2016-07-11 23:06:35 +01:00
|
|
|
OPCODE(LeastSignificantHalf, T::U16, T::U32 )
|
2016-07-01 14:01:06 +01:00
|
|
|
OPCODE(LeastSignificantByte, T::U8, T::U32 )
|
|
|
|
OPCODE(MostSignificantBit, T::U1, T::U32 )
|
|
|
|
OPCODE(IsZero, T::U1, T::U32 )
|
2016-08-04 22:04:42 +01:00
|
|
|
OPCODE(IsZero64, T::U1, T::U64 )
|
2016-07-01 14:01:06 +01:00
|
|
|
OPCODE(LogicalShiftLeft, T::U32, T::U32, T::U8, T::U1 )
|
|
|
|
OPCODE(LogicalShiftRight, T::U32, T::U32, T::U8, T::U1 )
|
2016-08-07 14:23:33 +01:00
|
|
|
OPCODE(LogicalShiftRight64, T::U64, T::U64, T::U8 )
|
2016-07-04 10:22:11 +01:00
|
|
|
OPCODE(ArithmeticShiftRight, T::U32, T::U32, T::U8, T::U1 )
|
2016-07-10 01:18:17 +01:00
|
|
|
OPCODE(RotateRight, T::U32, T::U32, T::U8, T::U1 )
|
2016-07-31 19:07:35 +01:00
|
|
|
OPCODE(RotateRightExtended, T::U32, T::U32, T::U1 )
|
2016-07-08 10:09:18 +01:00
|
|
|
OPCODE(AddWithCarry, T::U32, T::U32, T::U32, T::U1 )
|
2016-07-08 11:49:30 +01:00
|
|
|
OPCODE(SubWithCarry, T::U32, T::U32, T::U32, T::U1 )
|
2016-08-04 22:04:42 +01:00
|
|
|
OPCODE(Add64, T::U64, T::U64, T::U64 )
|
2016-08-06 06:09:47 +01:00
|
|
|
OPCODE(Sub64, T::U64, T::U64, T::U64 )
|
2016-08-04 22:04:42 +01:00
|
|
|
OPCODE(Mul, T::U32, T::U32, T::U32 )
|
|
|
|
OPCODE(Mul64, T::U64, T::U64, T::U64 )
|
2016-07-08 10:43:28 +01:00
|
|
|
OPCODE(And, T::U32, T::U32, T::U32 )
|
2016-07-08 11:14:50 +01:00
|
|
|
OPCODE(Eor, T::U32, T::U32, T::U32 )
|
2016-07-10 02:06:38 +01:00
|
|
|
OPCODE(Or, T::U32, T::U32, T::U32 )
|
2016-07-10 03:44:45 +01:00
|
|
|
OPCODE(Not, T::U32, T::U32 )
|
2016-08-04 22:04:42 +01:00
|
|
|
OPCODE(SignExtendWordToLong, T::U64, T::U32 )
|
2016-07-16 19:23:42 +01:00
|
|
|
OPCODE(SignExtendHalfToWord, T::U32, T::U16 )
|
|
|
|
OPCODE(SignExtendByteToWord, T::U32, T::U8 )
|
2016-08-04 22:04:42 +01:00
|
|
|
OPCODE(ZeroExtendWordToLong, T::U64, T::U32 )
|
2016-07-16 19:23:42 +01:00
|
|
|
OPCODE(ZeroExtendHalfToWord, T::U32, T::U16 )
|
|
|
|
OPCODE(ZeroExtendByteToWord, T::U32, T::U8 )
|
|
|
|
OPCODE(ByteReverseWord, T::U32, T::U32 )
|
|
|
|
OPCODE(ByteReverseHalf, T::U16, T::U16 )
|
2016-07-20 15:34:17 +01:00
|
|
|
OPCODE(ByteReverseDual, T::U64, T::U64 )
|
2016-08-12 18:26:14 +01:00
|
|
|
OPCODE(PackedSaturatedAddU8, T::U32, T::U32, T::U32 )
|
|
|
|
OPCODE(PackedSaturatedAddS8, T::U32, T::U32, T::U32 )
|
2016-08-12 16:53:16 +01:00
|
|
|
OPCODE(PackedSaturatedSubU8, T::U32, T::U32, T::U32 )
|
2016-08-12 18:18:38 +01:00
|
|
|
OPCODE(PackedSaturatedSubS8, T::U32, T::U32, T::U32 )
|
2016-08-12 18:42:16 +01:00
|
|
|
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 )
|
2016-07-11 22:43:53 +01:00
|
|
|
|
2016-08-06 17:21:29 +01:00
|
|
|
// Floating-point
|
2016-08-07 19:25:12 +01:00
|
|
|
OPCODE(TransferToFP32, T::F32, T::U32 )
|
|
|
|
OPCODE(TransferToFP64, T::F64, T::U64 )
|
|
|
|
OPCODE(TransferFromFP32, T::U32, T::F32 )
|
|
|
|
OPCODE(TransferFromFP64, T::U64, T::F64 )
|
2016-08-07 01:27:18 +01:00
|
|
|
OPCODE(FPAbs32, T::F32, T::F32 )
|
|
|
|
OPCODE(FPAbs64, T::F64, T::F64 )
|
2016-08-06 17:21:29 +01:00
|
|
|
OPCODE(FPAdd32, T::F32, T::F32, T::F32 )
|
|
|
|
OPCODE(FPAdd64, T::F64, T::F64, T::F64 )
|
2016-08-07 10:56:12 +01:00
|
|
|
OPCODE(FPDiv32, T::F32, T::F32, T::F32 )
|
|
|
|
OPCODE(FPDiv64, T::F64, T::F64, T::F64 )
|
2016-08-07 10:21:14 +01:00
|
|
|
OPCODE(FPMul32, T::F32, T::F32, T::F32 )
|
|
|
|
OPCODE(FPMul64, T::F64, T::F64, T::F64 )
|
2016-08-07 10:56:12 +01:00
|
|
|
OPCODE(FPNeg32, T::F32, T::F32 )
|
|
|
|
OPCODE(FPNeg64, T::F64, T::F64 )
|
2016-08-07 12:19:07 +01:00
|
|
|
OPCODE(FPSqrt32, T::F32, T::F32 )
|
|
|
|
OPCODE(FPSqrt64, T::F64, T::F64 )
|
2016-08-07 01:41:25 +01:00
|
|
|
OPCODE(FPSub32, T::F32, T::F32, T::F32 )
|
|
|
|
OPCODE(FPSub64, T::F64, T::F64, T::F64 )
|
2016-08-06 17:21:29 +01:00
|
|
|
|
2016-07-11 22:43:53 +01:00
|
|
|
// Memory access
|
TranslateArm: Implement CLREX, LDREX, LDREXB, LDREXD, LDREXH, STREX, STREXB, STREXD, STREXH, SWP, SWPB
2016-08-09 22:48:20 +01:00
|
|
|
OPCODE(ClearExclusive, T::Void, )
|
|
|
|
OPCODE(SetExclusive, T::Void, T::U32, T::U8 )
|
2016-07-11 22:43:53 +01:00
|
|
|
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 )
|
TranslateArm: Implement CLREX, LDREX, LDREXB, LDREXD, LDREXH, STREX, STREXB, STREXD, STREXH, SWP, SWPB
2016-08-09 22:48:20 +01:00
|
|
|
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 )
|