mirror of
https://github.com/asmjit/asmjit.git
synced 2025-12-17 12:34:35 +03:00
Added bswap r16 instruction, which has undefined behavior, but is encodable
This commit is contained in:
@@ -67,10 +67,15 @@ public:
|
|||||||
|
|
||||||
//! Emitter type.
|
//! Emitter type.
|
||||||
enum EmitterType : uint32_t {
|
enum EmitterType : uint32_t {
|
||||||
|
//! Unknown or uninitialized.
|
||||||
kTypeNone = 0,
|
kTypeNone = 0,
|
||||||
|
//! Emitter inherits from `BaseAssembler`.
|
||||||
kTypeAssembler = 1,
|
kTypeAssembler = 1,
|
||||||
|
//! Emitter inherits from `BaseBuilder`.
|
||||||
kTypeBuilder = 2,
|
kTypeBuilder = 2,
|
||||||
|
//! Emitter inherits from `BaseCompiler`.
|
||||||
kTypeCompiler = 3,
|
kTypeCompiler = 3,
|
||||||
|
//! Count of emitter types.
|
||||||
kTypeCount = 4
|
kTypeCount = 4
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1015,11 +1015,11 @@ CaseX86M_GPB_MulDiv:
|
|||||||
|
|
||||||
case InstDB::kEncodingX86Bswap:
|
case InstDB::kEncodingX86Bswap:
|
||||||
if (isign3 == ENC_OPS1(Reg)) {
|
if (isign3 == ENC_OPS1(Reg)) {
|
||||||
if (ASMJIT_UNLIKELY(o0.size() < 4))
|
if (ASMJIT_UNLIKELY(o0.size() == 1))
|
||||||
goto InvalidInstruction;
|
goto InvalidInstruction;
|
||||||
|
|
||||||
opReg = o0.id();
|
opReg = o0.id();
|
||||||
opcode.addWBySize(o0.size());
|
opcode.addPrefixBySize(o0.size());
|
||||||
goto EmitX86OpReg;
|
goto EmitX86OpReg;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user