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

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

Issue 104203003: Remove unused trigonometric code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comment Created 7 years 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/arm/lithium-arm.cc ('k') | src/assembler.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 3933 matching lines...) Expand 10 before | Expand all | Expand 10 after
3944 ASSERT(ToDoubleRegister(instr->result()).is(d2)); 3944 ASSERT(ToDoubleRegister(instr->result()).is(d2));
3945 // Set the context register to a GC-safe fake value. Clobbering it is 3945 // Set the context register to a GC-safe fake value. Clobbering it is
3946 // OK because this instruction is marked as a call. 3946 // OK because this instruction is marked as a call.
3947 __ mov(cp, Operand::Zero()); 3947 __ mov(cp, Operand::Zero());
3948 TranscendentalCacheStub stub(TranscendentalCache::LOG, 3948 TranscendentalCacheStub stub(TranscendentalCache::LOG,
3949 TranscendentalCacheStub::UNTAGGED); 3949 TranscendentalCacheStub::UNTAGGED);
3950 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); 3950 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
3951 } 3951 }
3952 3952
3953 3953
3954 void LCodeGen::DoMathTan(LMathTan* instr) {
3955 ASSERT(ToDoubleRegister(instr->result()).is(d2));
3956 // Set the context register to a GC-safe fake value. Clobbering it is
3957 // OK because this instruction is marked as a call.
3958 __ mov(cp, Operand::Zero());
3959 TranscendentalCacheStub stub(TranscendentalCache::TAN,
3960 TranscendentalCacheStub::UNTAGGED);
3961 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
3962 }
3963
3964
3965 void LCodeGen::DoMathCos(LMathCos* instr) {
3966 ASSERT(ToDoubleRegister(instr->result()).is(d2));
3967 // Set the context register to a GC-safe fake value. Clobbering it is
3968 // OK because this instruction is marked as a call.
3969 __ mov(cp, Operand::Zero());
3970 TranscendentalCacheStub stub(TranscendentalCache::COS,
3971 TranscendentalCacheStub::UNTAGGED);
3972 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
3973 }
3974
3975
3976 void LCodeGen::DoMathSin(LMathSin* instr) {
3977 ASSERT(ToDoubleRegister(instr->result()).is(d2));
3978 // Set the context register to a GC-safe fake value. Clobbering it is
3979 // OK because this instruction is marked as a call.
3980 __ mov(cp, Operand::Zero());
3981 TranscendentalCacheStub stub(TranscendentalCache::SIN,
3982 TranscendentalCacheStub::UNTAGGED);
3983 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
3984 }
3985
3986
3987 void LCodeGen::DoInvokeFunction(LInvokeFunction* instr) { 3954 void LCodeGen::DoInvokeFunction(LInvokeFunction* instr) {
3988 ASSERT(ToRegister(instr->context()).is(cp)); 3955 ASSERT(ToRegister(instr->context()).is(cp));
3989 ASSERT(ToRegister(instr->function()).is(r1)); 3956 ASSERT(ToRegister(instr->function()).is(r1));
3990 ASSERT(instr->HasPointerMap()); 3957 ASSERT(instr->HasPointerMap());
3991 3958
3992 Handle<JSFunction> known_function = instr->hydrogen()->known_function(); 3959 Handle<JSFunction> known_function = instr->hydrogen()->known_function();
3993 if (known_function.is_null()) { 3960 if (known_function.is_null()) {
3994 LPointerMap* pointers = instr->pointer_map(); 3961 LPointerMap* pointers = instr->pointer_map();
3995 SafepointGenerator generator(this, pointers, Safepoint::kLazyDeopt); 3962 SafepointGenerator generator(this, pointers, Safepoint::kLazyDeopt);
3996 ParameterCount count(instr->arity()); 3963 ParameterCount count(instr->arity());
(...skipping 1860 matching lines...) Expand 10 before | Expand all | Expand 10 after
5857 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); 5824 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index));
5858 __ ldr(result, FieldMemOperand(scratch, 5825 __ ldr(result, FieldMemOperand(scratch,
5859 FixedArray::kHeaderSize - kPointerSize)); 5826 FixedArray::kHeaderSize - kPointerSize));
5860 __ bind(&done); 5827 __ bind(&done);
5861 } 5828 }
5862 5829
5863 5830
5864 #undef __ 5831 #undef __
5865 5832
5866 } } // namespace v8::internal 5833 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698