Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Unified Diff: src/compiler/instruction.h

Issue 1921203002: Add new relocation type WASM_MEMORY_SIZE_REFERENCE, use relocatable pointers to update wasm memory … (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add compiler test Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/compiler/instruction.h
diff --git a/src/compiler/instruction.h b/src/compiler/instruction.h
index 9197e39eee383b5e345391af641f20b7b89a4d3e..159802b40a14e04a07cb51f69161c68927f2d962 100644
--- a/src/compiler/instruction.h
+++ b/src/compiler/instruction.h
@@ -1334,7 +1334,8 @@ class InstructionSequence final : public ZoneObject {
Immediates& immediates() { return immediates_; }
ImmediateOperand AddImmediate(const Constant& constant) {
- if (constant.type() == Constant::kInt32) {
+ if (constant.type() == Constant::kInt32 &&
+ RelocInfo::IsNone(constant.rmode())) {
return ImmediateOperand(ImmediateOperand::INLINE, constant.ToInt32());
}
int index = static_cast<int>(immediates_.size());

Powered by Google App Engine
This is Rietveld 408576698