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

Unified Diff: src/compiler/mips/code-generator-mips.cc

Issue 2021323003: [wasm] remove faux code objects Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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/mips/code-generator-mips.cc
diff --git a/src/compiler/mips/code-generator-mips.cc b/src/compiler/mips/code-generator-mips.cc
index ffc0258ba035582c347f097c77e98a45e9ded722..69d37474197f268a0ab26aec745870e71d2dda1f 100644
--- a/src/compiler/mips/code-generator-mips.cc
+++ b/src/compiler/mips/code-generator-mips.cc
@@ -547,8 +547,14 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction(
case kArchCallCodeObject: {
EnsureSpaceForLazyDeopt();
if (instr->InputAt(0)->IsImmediate()) {
- __ Call(Handle<Code>::cast(i.InputHeapObject(0)),
- RelocInfo::CODE_TARGET);
+ Constant callee_operand = i.ToConstant(instr->InputAt(0));
+ if (callee_operand.type() == Constant::Type::kInt32) {
+ __ Call(reinterpret_cast<Address>(callee_operand.ToInt32()),
+ RelocInfo::WASM_DIRECT_CALL);
+ } else {
+ __ Call(Handle<Code>::cast(i.InputHeapObject(0)),
+ RelocInfo::CODE_TARGET);
+ }
} else {
__ addiu(at, i.InputRegister(0), Code::kHeaderSize - kHeapObjectTag);
__ Call(at);

Powered by Google App Engine
This is Rietveld 408576698