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