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

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

Issue 159266: Add inline caching for keyed loads and stores. Remove extra parentheses from... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 5 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/x64/assembler-x64.h ('k') | src/x64/builtins-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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 755 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 766
767 void Assembler::decq(const Operand& dst) { 767 void Assembler::decq(const Operand& dst) {
768 EnsureSpace ensure_space(this); 768 EnsureSpace ensure_space(this);
769 last_pc_ = pc_; 769 last_pc_ = pc_;
770 emit_rex_64(dst); 770 emit_rex_64(dst);
771 emit(0xFF); 771 emit(0xFF);
772 emit_operand(1, dst); 772 emit_operand(1, dst);
773 } 773 }
774 774
775 775
776 void Assembler::decl(Register dst) {
777 EnsureSpace ensure_space(this);
778 last_pc_ = pc_;
779 emit_optional_rex_32(dst);
780 emit(0xFF);
781 emit_modrm(0x1, dst);
782 }
783
784
776 void Assembler::decl(const Operand& dst) { 785 void Assembler::decl(const Operand& dst) {
777 EnsureSpace ensure_space(this); 786 EnsureSpace ensure_space(this);
778 last_pc_ = pc_; 787 last_pc_ = pc_;
779 emit_optional_rex_32(dst); 788 emit_optional_rex_32(dst);
780 emit(0xFF); 789 emit(0xFF);
781 emit_operand(1, dst); 790 emit_operand(1, dst);
782 } 791 }
783 792
784 793
785 void Assembler::enter(Immediate size) { 794 void Assembler::enter(Immediate size) {
(...skipping 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
1514 emitq(reinterpret_cast<uintptr_t>(dst), mode); 1523 emitq(reinterpret_cast<uintptr_t>(dst), mode);
1515 } 1524 }
1516 1525
1517 1526
1518 void Assembler::store_rax(ExternalReference ref) { 1527 void Assembler::store_rax(ExternalReference ref) {
1519 store_rax(ref.address(), RelocInfo::EXTERNAL_REFERENCE); 1528 store_rax(ref.address(), RelocInfo::EXTERNAL_REFERENCE);
1520 } 1529 }
1521 1530
1522 1531
1523 void Assembler::testb(Register reg, Immediate mask) { 1532 void Assembler::testb(Register reg, Immediate mask) {
1524 ASSERT(is_int8(mask.value_)); 1533 ASSERT(is_int8(mask.value_) || is_uint8(mask.value_));
1525 EnsureSpace ensure_space(this); 1534 EnsureSpace ensure_space(this);
1526 last_pc_ = pc_; 1535 last_pc_ = pc_;
1527 if (reg.is(rax)) { 1536 if (reg.is(rax)) {
1528 emit(0xA8); 1537 emit(0xA8);
1529 emit(mask.value_); // Low byte emitted. 1538 emit(mask.value_); // Low byte emitted.
1530 } else { 1539 } else {
1531 if (reg.code() > 3) { 1540 if (reg.code() > 3) {
1532 // Register is not one of al, bl, cl, dl. Its encoding needs REX. 1541 // Register is not one of al, bl, cl, dl. Its encoding needs REX.
1533 emit_rex_32(reg); 1542 emit_rex_32(reg);
1534 } 1543 }
1535 emit(0xF6); 1544 emit(0xF6);
1536 emit_modrm(0x0, reg); 1545 emit_modrm(0x0, reg);
1537 emit(mask.value_); // Low byte emitted. 1546 emit(mask.value_); // Low byte emitted.
1538 } 1547 }
1539 } 1548 }
1540 1549
1541 1550
1542 void Assembler::testb(const Operand& op, Immediate mask) { 1551 void Assembler::testb(const Operand& op, Immediate mask) {
1543 ASSERT(is_int8(mask.value_)); 1552 ASSERT(is_int8(mask.value_) || is_uint8(mask.value_));
1544 EnsureSpace ensure_space(this); 1553 EnsureSpace ensure_space(this);
1545 last_pc_ = pc_; 1554 last_pc_ = pc_;
1546 emit_optional_rex_32(rax, op); 1555 emit_optional_rex_32(rax, op);
1547 emit(0xF6); 1556 emit(0xF6);
1548 emit_operand(rax, op); // Operation code 0 1557 emit_operand(rax, op); // Operation code 0
1549 emit(mask.value_); // Low byte emitted. 1558 emit(mask.value_); // Low byte emitted.
1550 } 1559 }
1551 1560
1552 1561
1553 void Assembler::testl(Register dst, Register src) { 1562 void Assembler::testl(Register dst, Register src) {
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
2176 RecordRelocInfo(RelocInfo::POSITION, current_position_); 2185 RecordRelocInfo(RelocInfo::POSITION, current_position_);
2177 written_position_ = current_position_; 2186 written_position_ = current_position_;
2178 } 2187 }
2179 } 2188 }
2180 2189
2181 2190
2182 const int RelocInfo::kApplyMask = 1 << RelocInfo::INTERNAL_REFERENCE; 2191 const int RelocInfo::kApplyMask = 1 << RelocInfo::INTERNAL_REFERENCE;
2183 2192
2184 2193
2185 } } // namespace v8::internal 2194 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/x64/assembler-x64.h ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698