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

Side by Side Diff: src/mips64/builtins-mips64.cc

Issue 695933002: MIPS64: Fix simulator arguments handling on generated code entry. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/mips64/simulator-mips64.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 5
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #if V8_TARGET_ARCH_MIPS64 9 #if V8_TARGET_ARCH_MIPS64
10 10
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 // Set up the context from the function argument. 775 // Set up the context from the function argument.
776 __ ld(cp, FieldMemOperand(a1, JSFunction::kContextOffset)); 776 __ ld(cp, FieldMemOperand(a1, JSFunction::kContextOffset));
777 777
778 // Push the function and the receiver onto the stack. 778 // Push the function and the receiver onto the stack.
779 __ Push(a1, a2); 779 __ Push(a1, a2);
780 780
781 // Copy arguments to the stack in a loop. 781 // Copy arguments to the stack in a loop.
782 // a3: argc 782 // a3: argc
783 // s0: argv, i.e. points to first arg 783 // s0: argv, i.e. points to first arg
784 Label loop, entry; 784 Label loop, entry;
785 // TODO(plind): At least on simulator, argc in a3 is an int32_t with junk
786 // in upper bits. Should fix the root cause, rather than use below
787 // workaround to clear upper bits.
788 __ dsll32(a3, a3, 0); // int32_t -> int64_t.
789 __ dsrl32(a3, a3, 0);
790 __ dsll(a4, a3, kPointerSizeLog2); 785 __ dsll(a4, a3, kPointerSizeLog2);
791 __ daddu(a6, s0, a4); 786 __ daddu(a6, s0, a4);
792 __ b(&entry); 787 __ b(&entry);
793 __ nop(); // Branch delay slot nop. 788 __ nop(); // Branch delay slot nop.
794 // a6 points past last arg. 789 // a6 points past last arg.
795 __ bind(&loop); 790 __ bind(&loop);
796 __ ld(a4, MemOperand(s0)); // Read next parameter. 791 __ ld(a4, MemOperand(s0)); // Read next parameter.
797 __ daddiu(s0, s0, kPointerSize); 792 __ daddiu(s0, s0, kPointerSize);
798 __ ld(a4, MemOperand(a4)); // Dereference handle. 793 __ ld(a4, MemOperand(a4)); // Dereference handle.
799 __ push(a4); // Push parameter. 794 __ push(a4); // Push parameter.
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after
1587 __ break_(0xCC); 1582 __ break_(0xCC);
1588 } 1583 }
1589 } 1584 }
1590 1585
1591 1586
1592 #undef __ 1587 #undef __
1593 1588
1594 } } // namespace v8::internal 1589 } } // namespace v8::internal
1595 1590
1596 #endif // V8_TARGET_ARCH_MIPS64 1591 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « no previous file | src/mips64/simulator-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698