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

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

Issue 8700004: Implement Math.tan in generated code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 3016 matching lines...) Expand 10 before | Expand all | Expand 10 after
3027 __ movdbl(Operand(esp, 0), input_reg); 3027 __ movdbl(Operand(esp, 0), input_reg);
3028 __ fld_d(Operand(esp, 0)); 3028 __ fld_d(Operand(esp, 0));
3029 __ fyl2x(); 3029 __ fyl2x();
3030 __ fstp_d(Operand(esp, 0)); 3030 __ fstp_d(Operand(esp, 0));
3031 __ movdbl(input_reg, Operand(esp, 0)); 3031 __ movdbl(input_reg, Operand(esp, 0));
3032 __ add(Operand(esp), Immediate(kDoubleSize)); 3032 __ add(Operand(esp), Immediate(kDoubleSize));
3033 __ bind(&done); 3033 __ bind(&done);
3034 } 3034 }
3035 3035
3036 3036
3037 void LCodeGen::DoMathTan(LUnaryMathOperation* instr) {
3038 ASSERT(ToDoubleRegister(instr->result()).is(xmm1));
3039 TranscendentalCacheStub stub(TranscendentalCache::TAN,
3040 TranscendentalCacheStub::UNTAGGED);
3041 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
3042 }
3043
3044
3037 void LCodeGen::DoMathCos(LUnaryMathOperation* instr) { 3045 void LCodeGen::DoMathCos(LUnaryMathOperation* instr) {
3038 ASSERT(ToDoubleRegister(instr->result()).is(xmm1)); 3046 ASSERT(ToDoubleRegister(instr->result()).is(xmm1));
3039 TranscendentalCacheStub stub(TranscendentalCache::COS, 3047 TranscendentalCacheStub stub(TranscendentalCache::COS,
3040 TranscendentalCacheStub::UNTAGGED); 3048 TranscendentalCacheStub::UNTAGGED);
3041 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); 3049 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
3042 } 3050 }
3043 3051
3044 3052
3045 void LCodeGen::DoMathSin(LUnaryMathOperation* instr) { 3053 void LCodeGen::DoMathSin(LUnaryMathOperation* instr) {
3046 ASSERT(ToDoubleRegister(instr->result()).is(xmm1)); 3054 ASSERT(ToDoubleRegister(instr->result()).is(xmm1));
(...skipping 19 matching lines...) Expand all
3066 break; 3074 break;
3067 case kMathPowHalf: 3075 case kMathPowHalf:
3068 DoMathPowHalf(instr); 3076 DoMathPowHalf(instr);
3069 break; 3077 break;
3070 case kMathCos: 3078 case kMathCos:
3071 DoMathCos(instr); 3079 DoMathCos(instr);
3072 break; 3080 break;
3073 case kMathSin: 3081 case kMathSin:
3074 DoMathSin(instr); 3082 DoMathSin(instr);
3075 break; 3083 break;
3084 case kMathTan:
3085 DoMathTan(instr);
3086 break;
3076 case kMathLog: 3087 case kMathLog:
3077 DoMathLog(instr); 3088 DoMathLog(instr);
3078 break; 3089 break;
3079 3090
3080 default: 3091 default:
3081 UNREACHABLE(); 3092 UNREACHABLE();
3082 } 3093 }
3083 } 3094 }
3084 3095
3085 3096
(...skipping 1535 matching lines...) Expand 10 before | Expand all | Expand 10 after
4621 this, pointers, Safepoint::kLazyDeopt); 4632 this, pointers, Safepoint::kLazyDeopt);
4622 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); 4633 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator);
4623 } 4634 }
4624 4635
4625 4636
4626 #undef __ 4637 #undef __
4627 4638
4628 } } // namespace v8::internal 4639 } } // namespace v8::internal
4629 4640
4630 #endif // V8_TARGET_ARCH_IA32 4641 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698