MIPS64: Fix simulator arguments handling on generated code entry.
authordusan.milosavljevic@imgtec.com <dusan.milosavljevic@imgtec.com>
Fri, 31 Oct 2014 18:33:33 +0000 (18:33 +0000)
committerdusan.milosavljevic@imgtec.com <dusan.milosavljevic@imgtec.com>
Fri, 31 Oct 2014 18:33:46 +0000 (18:33 +0000)
Removed workaround for this issue.

TEST=mjsunit, cctest on sim64
BUG=
R=paul.lind@imgtec.com

Review URL: https://codereview.chromium.org/695933002

Cr-Commit-Position: refs/heads/master@{#25043}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25043 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/mips64/builtins-mips64.cc
src/mips64/simulator-mips64.h

index e5f733c1a971d8f8718dbd1f56617b62bb72f0d7..f4bd386eae9e40f08ac682cf0c5ae449a822d88f 100644 (file)
@@ -782,11 +782,6 @@ static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm,
     // a3: argc
     // s0: argv, i.e. points to first arg
     Label loop, entry;
-    // TODO(plind): At least on simulator, argc in a3 is an int32_t with junk
-    //    in upper bits. Should fix the root cause, rather than use below
-    //    workaround to clear upper bits.
-    __ dsll32(a3, a3, 0);  // int32_t -> int64_t.
-    __ dsrl32(a3, a3, 0);
     __ dsll(a4, a3, kPointerSizeLog2);
     __ daddu(a6, s0, a4);
     __ b(&entry);
index 5241554be0441945a58585aeebdbf7353b2bfb5a..3087dcdab82232dc81de53ad67993c9db92395f6 100644 (file)
@@ -436,9 +436,12 @@ class Simulator {
 
 // When running with the simulator transition into simulated execution at this
 // point.
-#define CALL_GENERATED_CODE(entry, p0, p1, p2, p3, p4) \
-    reinterpret_cast<Object*>(Simulator::current(Isolate::Current())->Call( \
-      FUNCTION_ADDR(entry), 5, p0, p1, p2, p3, p4))
+#define CALL_GENERATED_CODE(entry, p0, p1, p2, p3, p4)                    \
+  reinterpret_cast<Object*>(Simulator::current(Isolate::Current())->Call( \
+      FUNCTION_ADDR(entry), 5, reinterpret_cast<int64_t*>(p0),            \
+      reinterpret_cast<int64_t*>(p1), reinterpret_cast<int64_t*>(p2),     \
+      reinterpret_cast<int64_t*>(p3), reinterpret_cast<int64_t*>(p4)))
+
 
 #ifdef MIPS_ABI_N64
 #define CALL_GENERATED_REGEXP_CODE(entry, p0, p1, p2, p3, p4, p5, p6, p7, p8) \