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

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

Issue 562153002: MIPS: Added CallInterfaceDescriptors to all code stubs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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/mips/interface-descriptors-mips.cc ('k') | src/mips/lithium-mips.cc » ('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.7 1 // Copyright 2012 the V8 project authors. All rights reserved.7
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 3836 matching lines...) Expand 10 before | Expand all | Expand 10 after
3847 __ add_d(result, input, kDoubleRegZero); 3847 __ add_d(result, input, kDoubleRegZero);
3848 __ sqrt_d(result, result); 3848 __ sqrt_d(result, result);
3849 __ bind(&done); 3849 __ bind(&done);
3850 } 3850 }
3851 3851
3852 3852
3853 void LCodeGen::DoPower(LPower* instr) { 3853 void LCodeGen::DoPower(LPower* instr) {
3854 Representation exponent_type = instr->hydrogen()->right()->representation(); 3854 Representation exponent_type = instr->hydrogen()->right()->representation();
3855 // Having marked this as a call, we can use any registers. 3855 // Having marked this as a call, we can use any registers.
3856 // Just make sure that the input/output registers are the expected ones. 3856 // Just make sure that the input/output registers are the expected ones.
3857 Register tagged_exponent = MathPowTaggedDescriptor::exponent();
3857 DCHECK(!instr->right()->IsDoubleRegister() || 3858 DCHECK(!instr->right()->IsDoubleRegister() ||
3858 ToDoubleRegister(instr->right()).is(f4)); 3859 ToDoubleRegister(instr->right()).is(f4));
3859 DCHECK(!instr->right()->IsRegister() || 3860 DCHECK(!instr->right()->IsRegister() ||
3860 ToRegister(instr->right()).is(a2)); 3861 ToRegister(instr->right()).is(tagged_exponent));
3861 DCHECK(ToDoubleRegister(instr->left()).is(f2)); 3862 DCHECK(ToDoubleRegister(instr->left()).is(f2));
3862 DCHECK(ToDoubleRegister(instr->result()).is(f0)); 3863 DCHECK(ToDoubleRegister(instr->result()).is(f0));
3863 3864
3864 if (exponent_type.IsSmi()) { 3865 if (exponent_type.IsSmi()) {
3865 MathPowStub stub(isolate(), MathPowStub::TAGGED); 3866 MathPowStub stub(isolate(), MathPowStub::TAGGED);
3866 __ CallStub(&stub); 3867 __ CallStub(&stub);
3867 } else if (exponent_type.IsTagged()) { 3868 } else if (exponent_type.IsTagged()) {
3868 Label no_deopt; 3869 Label no_deopt;
3869 __ JumpIfSmi(a2, &no_deopt); 3870 __ JumpIfSmi(tagged_exponent, &no_deopt);
3870 __ lw(t3, FieldMemOperand(a2, HeapObject::kMapOffset)); 3871 DCHECK(!t3.is(tagged_exponent));
3872 __ lw(t3, FieldMemOperand(tagged_exponent, HeapObject::kMapOffset));
3871 __ LoadRoot(at, Heap::kHeapNumberMapRootIndex); 3873 __ LoadRoot(at, Heap::kHeapNumberMapRootIndex);
3872 DeoptimizeIf(ne, instr->environment(), t3, Operand(at)); 3874 DeoptimizeIf(ne, instr->environment(), t3, Operand(at));
3873 __ bind(&no_deopt); 3875 __ bind(&no_deopt);
3874 MathPowStub stub(isolate(), MathPowStub::TAGGED); 3876 MathPowStub stub(isolate(), MathPowStub::TAGGED);
3875 __ CallStub(&stub); 3877 __ CallStub(&stub);
3876 } else if (exponent_type.IsInteger32()) { 3878 } else if (exponent_type.IsInteger32()) {
3877 MathPowStub stub(isolate(), MathPowStub::INTEGER); 3879 MathPowStub stub(isolate(), MathPowStub::INTEGER);
3878 __ CallStub(&stub); 3880 __ CallStub(&stub);
3879 } else { 3881 } else {
3880 DCHECK(exponent_type.IsDouble()); 3882 DCHECK(exponent_type.IsDouble());
(...skipping 2045 matching lines...) Expand 10 before | Expand all | Expand 10 after
5926 __ li(at, scope_info); 5928 __ li(at, scope_info);
5927 __ Push(at, ToRegister(instr->function())); 5929 __ Push(at, ToRegister(instr->function()));
5928 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5930 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5929 RecordSafepoint(Safepoint::kNoLazyDeopt); 5931 RecordSafepoint(Safepoint::kNoLazyDeopt);
5930 } 5932 }
5931 5933
5932 5934
5933 #undef __ 5935 #undef __
5934 5936
5935 } } // namespace v8::internal 5937 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/interface-descriptors-mips.cc ('k') | src/mips/lithium-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698