asmjit: sync with upstream (nw)

This commit is contained in:
Patrick Mackinlay 2020-06-18 18:26:21 +07:00
parent 1fce454a0b
commit 954451fbfa
2 changed files with 5 additions and 2 deletions

View File

@ -533,6 +533,7 @@ Error BaseCompiler::newJumpNode(JumpNode** out, uint32_t instId, uint32_t instOp
JumpNode* node = _allocator.allocT<JumpNode>();
uint32_t opCount = 1;
*out = node;
if (ASMJIT_UNLIKELY(!node))
return reportError(DebugUtils::errored(kErrorOutOfMemory));
@ -540,7 +541,6 @@ Error BaseCompiler::newJumpNode(JumpNode** out, uint32_t instId, uint32_t instOp
node->setOp(0, o0);
node->resetOpRange(opCount, JumpNode::kBaseOpCapacity);
*out = node;
return kErrorOk;
}

View File

@ -377,7 +377,7 @@ ASMJIT_FAVOR_SIZE Error InstInternal::validate(uint32_t arch, const BaseInst& in
memSize <<= m.getBroadcast();
}
if (baseType) {
if (baseType != 0 && baseType > Label::kLabelTag) {
uint32_t baseId = m.baseId();
if (m.isRegHome()) {
@ -412,6 +412,9 @@ ASMJIT_FAVOR_SIZE Error InstInternal::validate(uint32_t arch, const BaseInst& in
if (!indexType && !m.offsetLo32())
memFlags |= InstDB::kMemOpBaseOnly;
}
else if (baseType == Label::kLabelTag) {
// [Label] - there is no need to validate the base as it's label.
}
else {
// Base is a 64-bit address.
int64_t offset = m.offset();