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

Side by Side Diff: src/mips/lithium-codegen-mips.cc

Issue 9838059: Rollback of r11118, r11109 in trunk branch. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | src/mips/lithium-mips.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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2633 matching lines...) Expand 10 before | Expand all | Expand 10 after
2644 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); 2644 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize();
2645 CallCode(ic, RelocInfo::CODE_TARGET, instr); 2645 CallCode(ic, RelocInfo::CODE_TARGET, instr);
2646 } 2646 }
2647 2647
2648 2648
2649 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { 2649 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) {
2650 Register scratch = scratch0(); 2650 Register scratch = scratch0();
2651 Register temp = scratch1(); 2651 Register temp = scratch1();
2652 Register result = ToRegister(instr->result()); 2652 Register result = ToRegister(instr->result());
2653 2653
2654 if (instr->from_inlined()) { 2654 // Check if the calling frame is an arguments adaptor frame.
2655 __ Subu(result, sp, 2 * kPointerSize); 2655 Label done, adapted;
2656 } else { 2656 __ lw(scratch, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
2657 // Check if the calling frame is an arguments adaptor frame. 2657 __ lw(result, MemOperand(scratch, StandardFrameConstants::kContextOffset));
2658 Label done, adapted; 2658 __ Xor(temp, result, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)));
2659 __ lw(scratch, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
2660 __ lw(result, MemOperand(scratch, StandardFrameConstants::kContextOffset));
2661 __ Xor(temp, result, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)));
2662 2659
2663 // Result is the frame pointer for the frame if not adapted and for the real 2660 // Result is the frame pointer for the frame if not adapted and for the real
2664 // frame below the adaptor frame if adapted. 2661 // frame below the adaptor frame if adapted.
2665 __ Movn(result, fp, temp); // Move only if temp is not equal to zero (ne). 2662 __ Movn(result, fp, temp); // Move only if temp is not equal to zero (ne).
2666 __ Movz(result, scratch, temp); // Move only if temp is equal to zero (eq). 2663 __ Movz(result, scratch, temp); // Move only if temp is equal to zero (eq).
2667 }
2668 } 2664 }
2669 2665
2670 2666
2671 void LCodeGen::DoArgumentsLength(LArgumentsLength* instr) { 2667 void LCodeGen::DoArgumentsLength(LArgumentsLength* instr) {
2672 Register elem = ToRegister(instr->InputAt(0)); 2668 Register elem = ToRegister(instr->InputAt(0));
2673 Register result = ToRegister(instr->result()); 2669 Register result = ToRegister(instr->result());
2674 2670
2675 Label done; 2671 Label done;
2676 2672
2677 // If no arguments adaptor frame the number of arguments is fixed. 2673 // If no arguments adaptor frame the number of arguments is fixed.
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
2790 LOperand* argument = instr->InputAt(0); 2786 LOperand* argument = instr->InputAt(0);
2791 if (argument->IsDoubleRegister() || argument->IsDoubleStackSlot()) { 2787 if (argument->IsDoubleRegister() || argument->IsDoubleStackSlot()) {
2792 Abort("DoPushArgument not implemented for double type."); 2788 Abort("DoPushArgument not implemented for double type.");
2793 } else { 2789 } else {
2794 Register argument_reg = EmitLoadRegister(argument, at); 2790 Register argument_reg = EmitLoadRegister(argument, at);
2795 __ push(argument_reg); 2791 __ push(argument_reg);
2796 } 2792 }
2797 } 2793 }
2798 2794
2799 2795
2800 void LCodeGen::DoPop(LPop* instr) {
2801 __ Drop(instr->count());
2802 }
2803
2804
2805 void LCodeGen::DoThisFunction(LThisFunction* instr) { 2796 void LCodeGen::DoThisFunction(LThisFunction* instr) {
2806 Register result = ToRegister(instr->result()); 2797 Register result = ToRegister(instr->result());
2807 __ LoadHeapObject(result, instr->hydrogen()->closure()); 2798 __ LoadHeapObject(result, instr->hydrogen()->closure());
2808 } 2799 }
2809 2800
2810 2801
2811 void LCodeGen::DoContext(LContext* instr) { 2802 void LCodeGen::DoContext(LContext* instr) {
2812 Register result = ToRegister(instr->result()); 2803 Register result = ToRegister(instr->result());
2813 __ mov(result, cp); 2804 __ mov(result, cp);
2814 } 2805 }
(...skipping 2241 matching lines...) Expand 10 before | Expand all | Expand 10 after
5056 __ Subu(scratch, result, scratch); 5047 __ Subu(scratch, result, scratch);
5057 __ lw(result, FieldMemOperand(scratch, 5048 __ lw(result, FieldMemOperand(scratch,
5058 FixedArray::kHeaderSize - kPointerSize)); 5049 FixedArray::kHeaderSize - kPointerSize));
5059 __ bind(&done); 5050 __ bind(&done);
5060 } 5051 }
5061 5052
5062 5053
5063 #undef __ 5054 #undef __
5064 5055
5065 } } // namespace v8::internal 5056 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | src/mips/lithium-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698