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

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

Issue 1405453003: CTZ instruction implemented as optional operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed a bug when bmi1=false Created 5 years, 2 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
« 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 727 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 738
739 void Assembler::bsrl(Register dst, const Operand& src) { 739 void Assembler::bsrl(Register dst, const Operand& src) {
740 EnsureSpace ensure_space(this); 740 EnsureSpace ensure_space(this);
741 emit_optional_rex_32(dst, src); 741 emit_optional_rex_32(dst, src);
742 emit(0x0F); 742 emit(0x0F);
743 emit(0xBD); 743 emit(0xBD);
744 emit_operand(dst, src); 744 emit_operand(dst, src);
745 } 745 }
746 746
747 747
748 void Assembler::bsfl(Register dst, Register src) {
749 EnsureSpace ensure_space(this);
750 emit_optional_rex_32(dst, src);
751 emit(0x0F);
752 emit(0xBC);
753 emit_modrm(dst, src);
754 }
755
756
757 void Assembler::bsfl(Register dst, const Operand& src) {
758 EnsureSpace ensure_space(this);
759 emit_optional_rex_32(dst, src);
760 emit(0x0F);
761 emit(0xBC);
762 emit_operand(dst, src);
763 }
764
765
748 void Assembler::call(Label* L) { 766 void Assembler::call(Label* L) {
749 positions_recorder()->WriteRecordedPositions(); 767 positions_recorder()->WriteRecordedPositions();
750 EnsureSpace ensure_space(this); 768 EnsureSpace ensure_space(this);
751 // 1110 1000 #32-bit disp. 769 // 1110 1000 #32-bit disp.
752 emit(0xE8); 770 emit(0xE8);
753 if (L->is_bound()) { 771 if (L->is_bound()) {
754 int offset = L->pos() - pc_offset() - sizeof(int32_t); 772 int offset = L->pos() - pc_offset() - sizeof(int32_t);
755 DCHECK(offset <= 0); 773 DCHECK(offset <= 0);
756 emitl(offset); 774 emitl(offset);
757 } else if (L->is_linked()) { 775 } else if (L->is_linked()) {
(...skipping 3171 matching lines...) Expand 10 before | Expand all | Expand 10 after
3929 3947
3930 bool RelocInfo::IsInConstantPool() { 3948 bool RelocInfo::IsInConstantPool() {
3931 return false; 3949 return false;
3932 } 3950 }
3933 3951
3934 3952
3935 } // namespace internal 3953 } // namespace internal
3936 } // namespace v8 3954 } // namespace v8
3937 3955
3938 #endif // V8_TARGET_ARCH_X64 3956 #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