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

Side by Side Diff: src/ia32/assembler-ia32.cc

Issue 125121: Optimize Math.sin and Math.cos by avoiding runtime calls. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 6 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/ia32/assembler-ia32.h ('k') | src/ia32/codegen-ia32.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 (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 1638 matching lines...) Expand 10 before | Expand all | Expand 10 after
1649 1649
1650 1650
1651 void Assembler::fchs() { 1651 void Assembler::fchs() {
1652 EnsureSpace ensure_space(this); 1652 EnsureSpace ensure_space(this);
1653 last_pc_ = pc_; 1653 last_pc_ = pc_;
1654 EMIT(0xD9); 1654 EMIT(0xD9);
1655 EMIT(0xE0); 1655 EMIT(0xE0);
1656 } 1656 }
1657 1657
1658 1658
1659 void Assembler::fcos() {
1660 EnsureSpace ensure_space(this);
1661 last_pc_ = pc_;
1662 EMIT(0xD9);
1663 EMIT(0xFF);
1664 }
1665
1666
1667 void Assembler::fsin() {
1668 EnsureSpace ensure_space(this);
1669 last_pc_ = pc_;
1670 EMIT(0xD9);
1671 EMIT(0xFE);
1672 }
1673
1674
1659 void Assembler::fadd(int i) { 1675 void Assembler::fadd(int i) {
1660 EnsureSpace ensure_space(this); 1676 EnsureSpace ensure_space(this);
1661 last_pc_ = pc_; 1677 last_pc_ = pc_;
1662 emit_farith(0xDC, 0xC0, i); 1678 emit_farith(0xDC, 0xC0, i);
1663 } 1679 }
1664 1680
1665 1681
1666 void Assembler::fsub(int i) { 1682 void Assembler::fsub(int i) {
1667 EnsureSpace ensure_space(this); 1683 EnsureSpace ensure_space(this);
1668 last_pc_ = pc_; 1684 last_pc_ = pc_;
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
2196 push_insn[1] = 13; // Skip over coverage insns. 2212 push_insn[1] = 13; // Skip over coverage insns.
2197 if (coverage_log != NULL) { 2213 if (coverage_log != NULL) {
2198 fprintf(coverage_log, "%s\n", file_line); 2214 fprintf(coverage_log, "%s\n", file_line);
2199 fflush(coverage_log); 2215 fflush(coverage_log);
2200 } 2216 }
2201 } 2217 }
2202 2218
2203 #endif 2219 #endif
2204 2220
2205 } } // namespace v8::internal 2221 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/assembler-ia32.h ('k') | src/ia32/codegen-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698