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

Side by Side Diff: src/x64/codegen-x64.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/x64/code-stubs-x64.cc ('k') | src/x64/lithium-codegen-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 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 UnaryMathFunction CreateTranscendentalFunction(TranscendentalCache::Type type) { 58 UnaryMathFunction CreateTranscendentalFunction(TranscendentalCache::Type type) {
59 size_t actual_size; 59 size_t actual_size;
60 // Allocate buffer in executable space. 60 // Allocate buffer in executable space.
61 byte* buffer = static_cast<byte*>(OS::Allocate(1 * KB, 61 byte* buffer = static_cast<byte*>(OS::Allocate(1 * KB,
62 &actual_size, 62 &actual_size,
63 true)); 63 true));
64 if (buffer == NULL) { 64 if (buffer == NULL) {
65 // Fallback to library function if function cannot be created. 65 // Fallback to library function if function cannot be created.
66 switch (type) { 66 switch (type) {
67 case TranscendentalCache::SIN: return &sin;
68 case TranscendentalCache::COS: return &cos;
69 case TranscendentalCache::TAN: return &tan;
70 case TranscendentalCache::LOG: return &log; 67 case TranscendentalCache::LOG: return &log;
71 default: UNIMPLEMENTED(); 68 default: UNIMPLEMENTED();
72 } 69 }
73 } 70 }
74 71
75 MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size)); 72 MacroAssembler masm(NULL, buffer, static_cast<int>(actual_size));
76 // xmm0: raw double input. 73 // xmm0: raw double input.
77 // Move double input into registers. 74 // Move double input into registers.
78 __ push(rbx); 75 __ push(rbx);
79 __ push(rdi); 76 __ push(rdi);
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 // argument_count_reg_ * times_pointer_size + (receiver - 1) * kPointerSize. 751 // argument_count_reg_ * times_pointer_size + (receiver - 1) * kPointerSize.
755 return Operand(base_reg_, argument_count_reg_, times_pointer_size, 752 return Operand(base_reg_, argument_count_reg_, times_pointer_size,
756 displacement_to_last_argument + (receiver - 1 - index) * kPointerSize); 753 displacement_to_last_argument + (receiver - 1 - index) * kPointerSize);
757 } 754 }
758 } 755 }
759 756
760 757
761 } } // namespace v8::internal 758 } } // namespace v8::internal
762 759
763 #endif // V8_TARGET_ARCH_X64 760 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698