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

Unified Diff: src/ia32/macro-assembler-ia32.cc

Issue 2229723002: [wasm] Support validation of asm.js modules with != 3 args. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 4 years, 4 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/ia32/macro-assembler-ia32.cc
diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc
index 83c7ce891758b9ca68091d18dad3dd3404dc70da..5a8473266cfdd187195e4a25145a1b182ce47930 100644
--- a/src/ia32/macro-assembler-ia32.cc
+++ b/src/ia32/macro-assembler-ia32.cc
@@ -2180,7 +2180,9 @@ void MacroAssembler::CallRuntime(const Runtime::Function* f,
// arguments passed in because it is constant. At some point we
// should remove this need and make the runtime routine entry code
// smarter.
- Move(eax, Immediate(num_arguments));
+ if (num_arguments >= 0) {
+ Move(eax, Immediate(num_arguments));
+ }
mov(ebx, Immediate(ExternalReference(f, isolate())));
CEntryStub ces(isolate(), 1, save_doubles);
CallStub(&ces);

Powered by Google App Engine
This is Rietveld 408576698