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

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

Issue 1421163005: Implemented the ctz Turbo Fan operator for x64. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed the comments Created 5 years, 1 month 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
« no previous file with comments | « src/x64/assembler-x64.h ('k') | src/x64/macro-assembler-x64.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/x64/assembler-x64.h" 5 #include "src/x64/assembler-x64.h"
6 6
7 #include <cstring> 7 #include <cstring>
8 8
9 #if V8_TARGET_ARCH_X64 9 #if V8_TARGET_ARCH_X64
10 10
(...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 774
775 void Assembler::bsfl(Register dst, const Operand& src) { 775 void Assembler::bsfl(Register dst, const Operand& src) {
776 EnsureSpace ensure_space(this); 776 EnsureSpace ensure_space(this);
777 emit_optional_rex_32(dst, src); 777 emit_optional_rex_32(dst, src);
778 emit(0x0F); 778 emit(0x0F);
779 emit(0xBC); 779 emit(0xBC);
780 emit_operand(dst, src); 780 emit_operand(dst, src);
781 } 781 }
782 782
783 783
784 void Assembler::bsfq(Register dst, Register src) {
785 EnsureSpace ensure_space(this);
786 emit_rex_64(dst, src);
787 emit(0x0F);
788 emit(0xBC);
789 emit_modrm(dst, src);
790 }
791
792
793 void Assembler::bsfq(Register dst, const Operand& src) {
794 EnsureSpace ensure_space(this);
795 emit_rex_64(dst, src);
796 emit(0x0F);
797 emit(0xBC);
798 emit_operand(dst, src);
799 }
800
801
784 void Assembler::call(Label* L) { 802 void Assembler::call(Label* L) {
785 positions_recorder()->WriteRecordedPositions(); 803 positions_recorder()->WriteRecordedPositions();
786 EnsureSpace ensure_space(this); 804 EnsureSpace ensure_space(this);
787 // 1110 1000 #32-bit disp. 805 // 1110 1000 #32-bit disp.
788 emit(0xE8); 806 emit(0xE8);
789 if (L->is_bound()) { 807 if (L->is_bound()) {
790 int offset = L->pos() - pc_offset() - sizeof(int32_t); 808 int offset = L->pos() - pc_offset() - sizeof(int32_t);
791 DCHECK(offset <= 0); 809 DCHECK(offset <= 0);
792 emitl(offset); 810 emitl(offset);
793 } else if (L->is_linked()) { 811 } else if (L->is_linked()) {
(...skipping 3265 matching lines...) Expand 10 before | Expand all | Expand 10 after
4059 4077
4060 bool RelocInfo::IsInConstantPool() { 4078 bool RelocInfo::IsInConstantPool() {
4061 return false; 4079 return false;
4062 } 4080 }
4063 4081
4064 4082
4065 } // namespace internal 4083 } // namespace internal
4066 } // namespace v8 4084 } // namespace v8
4067 4085
4068 #endif // V8_TARGET_ARCH_X64 4086 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/assembler-x64.h ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698