From: dusan.milosavljevic@imgtec.com Date: Fri, 31 Oct 2014 18:33:33 +0000 (+0000) Subject: MIPS64: Fix simulator arguments handling on generated code entry. X-Git-Tag: upstream/4.7.83~5966 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=66dd92f754a0ef10e0ce3b3533d8ca1c44afaf27;p=platform%2Fupstream%2Fv8.git MIPS64: Fix simulator arguments handling on generated code entry. 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 --- diff --git a/src/mips64/builtins-mips64.cc b/src/mips64/builtins-mips64.cc index e5f733c1a..f4bd386ea 100644 --- a/src/mips64/builtins-mips64.cc +++ b/src/mips64/builtins-mips64.cc @@ -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); diff --git a/src/mips64/simulator-mips64.h b/src/mips64/simulator-mips64.h index 5241554be..3087dcdab 100644 --- a/src/mips64/simulator-mips64.h +++ b/src/mips64/simulator-mips64.h @@ -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(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(Simulator::current(Isolate::Current())->Call( \ + FUNCTION_ADDR(entry), 5, reinterpret_cast(p0), \ + reinterpret_cast(p1), reinterpret_cast(p2), \ + reinterpret_cast(p3), reinterpret_cast(p4))) + #ifdef MIPS_ABI_N64 #define CALL_GENERATED_REGEXP_CODE(entry, p0, p1, p2, p3, p4, p5, p6, p7, p8) \