OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |