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

Side by Side Diff: src/x64/codegen-x64.cc

Issue 5437002: Add generated code to calculate Math.log and to search Transcendental cache f... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 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/x64/codegen-x64.h ('k') | src/x64/disasm-x64.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 7093 matching lines...) Expand 10 before | Expand all | Expand 10 after
7104 7104
7105 void CodeGenerator::GenerateMathCos(ZoneList<Expression*>* args) { 7105 void CodeGenerator::GenerateMathCos(ZoneList<Expression*>* args) {
7106 ASSERT_EQ(args->length(), 1); 7106 ASSERT_EQ(args->length(), 1);
7107 Load(args->at(0)); 7107 Load(args->at(0));
7108 TranscendentalCacheStub stub(TranscendentalCache::COS); 7108 TranscendentalCacheStub stub(TranscendentalCache::COS);
7109 Result result = frame_->CallStub(&stub, 1); 7109 Result result = frame_->CallStub(&stub, 1);
7110 frame_->Push(&result); 7110 frame_->Push(&result);
7111 } 7111 }
7112 7112
7113 7113
7114 void CodeGenerator::GenerateMathLog(ZoneList<Expression*>* args) {
7115 ASSERT_EQ(args->length(), 1);
7116 Load(args->at(0));
7117 TranscendentalCacheStub stub(TranscendentalCache::LOG);
7118 Result result = frame_->CallStub(&stub, 1);
7119 frame_->Push(&result);
7120 }
7121
7122
7114 // Generates the Math.sqrt method. Please note - this function assumes that 7123 // Generates the Math.sqrt method. Please note - this function assumes that
7115 // the callsite has executed ToNumber on the argument. 7124 // the callsite has executed ToNumber on the argument.
7116 void CodeGenerator::GenerateMathSqrt(ZoneList<Expression*>* args) { 7125 void CodeGenerator::GenerateMathSqrt(ZoneList<Expression*>* args) {
7117 ASSERT(args->length() == 1); 7126 ASSERT(args->length() == 1);
7118 Load(args->at(0)); 7127 Load(args->at(0));
7119 7128
7120 // Leave original value on the frame if we need to call runtime. 7129 // Leave original value on the frame if we need to call runtime.
7121 frame()->Dup(); 7130 frame()->Dup();
7122 Result result = frame()->Pop(); 7131 Result result = frame()->Pop();
7123 result.ToRegister(); 7132 result.ToRegister();
(...skipping 1754 matching lines...) Expand 10 before | Expand all | Expand 10 after
8878 #undef __ 8887 #undef __
8879 8888
8880 void RecordWriteStub::Generate(MacroAssembler* masm) { 8889 void RecordWriteStub::Generate(MacroAssembler* masm) {
8881 masm->RecordWriteHelper(object_, addr_, scratch_); 8890 masm->RecordWriteHelper(object_, addr_, scratch_);
8882 masm->ret(0); 8891 masm->ret(0);
8883 } 8892 }
8884 8893
8885 } } // namespace v8::internal 8894 } } // namespace v8::internal
8886 8895
8887 #endif // V8_TARGET_ARCH_X64 8896 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/codegen-x64.h ('k') | src/x64/disasm-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698