Commit 4abbb59c by John Porto Committed by Jim Stichnoth

Subzero. X8664. No moar ::new for AutoBundle.

parent c10c1569
...@@ -461,7 +461,7 @@ protected: ...@@ -461,7 +461,7 @@ protected:
X86OperandMem **findMemoryReference() { return nullptr; } X86OperandMem **findMemoryReference() { return nullptr; }
public: public:
std::unique_ptr<AutoBundle> Bundler; AutoBundle *Bundler = nullptr;
X86OperandMem **const MemOperand; X86OperandMem **const MemOperand;
template <typename... T> template <typename... T>
...@@ -471,13 +471,18 @@ protected: ...@@ -471,13 +471,18 @@ protected:
: findMemoryReference(Args...)) { : findMemoryReference(Args...)) {
if (MemOperand != nullptr) { if (MemOperand != nullptr) {
if (Traits::Is64Bit) { if (Traits::Is64Bit) {
Bundler = makeUnique<AutoBundle>(Target, BundleLockOpt); Bundler = new (Target->Func->template allocate<AutoBundle>())
AutoBundle(Target, BundleLockOpt);
} }
*MemOperand = Target->_sandbox_mem_reference(*MemOperand); *MemOperand = Target->_sandbox_mem_reference(*MemOperand);
} }
} }
~AutoMemorySandboxer() {} ~AutoMemorySandboxer() {
if (Bundler != nullptr) {
Bundler->~AutoBundle();
}
}
}; };
/// The following are helpers that insert lowered x86 instructions with /// The following are helpers that insert lowered x86 instructions with
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment