summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Patrick Mackinlay <pmackinlay@hotmail.com>2020-06-18 18:26:21 +0700
committer Patrick Mackinlay <pmackinlay@hotmail.com>2020-06-18 18:26:21 +0700
commit954451fbfa00f8dfd496d01045aed7cfaa0b6774 (patch)
tree6f83499f350e1bd675596da8b7a9ff466af1ba69
parent1fce454a0b1556474b4d6f2ad09ef198a8798e0d (diff)
asmjit: sync with upstream (nw)
-rw-r--r--3rdparty/asmjit/src/asmjit/core/compiler.cpp2
-rw-r--r--3rdparty/asmjit/src/asmjit/x86/x86instapi.cpp5
2 files changed, 5 insertions, 2 deletions
diff --git a/3rdparty/asmjit/src/asmjit/core/compiler.cpp b/3rdparty/asmjit/src/asmjit/core/compiler.cpp
index 251a6ff2a3e..8043b48c847 100644
--- a/3rdparty/asmjit/src/asmjit/core/compiler.cpp
+++ b/3rdparty/asmjit/src/asmjit/core/compiler.cpp
@@ -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;
}
diff --git a/3rdparty/asmjit/src/asmjit/x86/x86instapi.cpp b/3rdparty/asmjit/src/asmjit/x86/x86instapi.cpp
index 82f782e0fc6..2dfd25fc4a6 100644
--- a/3rdparty/asmjit/src/asmjit/x86/x86instapi.cpp
+++ b/3rdparty/asmjit/src/asmjit/x86/x86instapi.cpp
@@ -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();