mirror of
https://github.com/asmjit/asmjit.git
synced 2025-12-17 04:24:37 +03:00
Dump an instruction signature on error, corrected x86 validator a bit, adjusted DB according to asmdb changes
This commit is contained in:
@@ -563,8 +563,10 @@ Error X86Assembler::_emit(uint32_t instId, const Operand_& o0, const Operand_& o
|
|||||||
|
|
||||||
// Strict validation.
|
// Strict validation.
|
||||||
#if !defined(ASMJIT_DISABLE_VALIDATION)
|
#if !defined(ASMJIT_DISABLE_VALIDATION)
|
||||||
if (options & CodeEmitter::kOptionStrictValidation)
|
if (options & CodeEmitter::kOptionStrictValidation) {
|
||||||
ASMJIT_PROPAGATE(_validate(instId, o0, o1, o2, o3));
|
err = _validate(instId, o0, o1, o2, o3);
|
||||||
|
if (ASMJIT_UNLIKELY(err)) goto Failed;
|
||||||
|
}
|
||||||
#endif // !ASMJIT_DISABLE_VALIDATION
|
#endif // !ASMJIT_DISABLE_VALIDATION
|
||||||
|
|
||||||
uint32_t instFlags = instData->getFlags();
|
uint32_t instFlags = instData->getFlags();
|
||||||
|
|||||||
@@ -134,7 +134,17 @@ Error X86Compiler::_emit(uint32_t instId, const Operand_& o0, const Operand_& o1
|
|||||||
};
|
};
|
||||||
|
|
||||||
Error err = X86Inst::validate(getArchType(), instId, options, _opExtra, opArray, opCount);
|
Error err = X86Inst::validate(getArchType(), instId, options, _opExtra, opArray, opCount);
|
||||||
if (err) return setLastError(err);
|
if (err) {
|
||||||
|
#if !defined(ASMJIT_DISABLE_LOGGING)
|
||||||
|
StringBuilderTmp<256> sb;
|
||||||
|
sb.appendString(DebugUtils::errorAsString(err));
|
||||||
|
sb.appendString(": ");
|
||||||
|
Logging::formatInstruction(sb, 0, this, getArchType(), instId, options, _opExtra, opArray, opCount);
|
||||||
|
return setLastError(err, sb.getData());
|
||||||
|
#else
|
||||||
|
return setLastError(err);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
// Clear it as it must be enabled explicitly on assembler side.
|
// Clear it as it must be enabled explicitly on assembler side.
|
||||||
options &= ~kOptionStrictValidation;
|
options &= ~kOptionStrictValidation;
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename RegT>
|
template<typename RegT>
|
||||||
ASMJIT_INLINE RegT newSimilarReg(const RegT& ref, const char* nameFmt, ...) {
|
RegT newSimilarReg(const RegT& ref, const char* nameFmt, ...) {
|
||||||
RegT reg(NoInit);
|
RegT reg(NoInit);
|
||||||
ASMJIT_NEW_REG(reg, ref, nameFmt);
|
ASMJIT_NEW_REG(reg, ref, nameFmt);
|
||||||
return reg;
|
return reg;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user