OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
743 | 743 |
744 void Assembler::bts(const Operand& dst, Register src) { | 744 void Assembler::bts(const Operand& dst, Register src) { |
745 EnsureSpace ensure_space(this); | 745 EnsureSpace ensure_space(this); |
746 emit_rex_64(src, dst); | 746 emit_rex_64(src, dst); |
747 emit(0x0F); | 747 emit(0x0F); |
748 emit(0xAB); | 748 emit(0xAB); |
749 emit_operand(src, dst); | 749 emit_operand(src, dst); |
750 } | 750 } |
751 | 751 |
752 | 752 |
| 753 void Assembler::bsrl(Register dst, Register src) { |
| 754 EnsureSpace ensure_space(this); |
| 755 emit_optional_rex_32(dst, src); |
| 756 emit(0x0F); |
| 757 emit(0xBD); |
| 758 emit_modrm(dst, src); |
| 759 } |
| 760 |
| 761 |
753 void Assembler::call(Label* L) { | 762 void Assembler::call(Label* L) { |
754 positions_recorder()->WriteRecordedPositions(); | 763 positions_recorder()->WriteRecordedPositions(); |
755 EnsureSpace ensure_space(this); | 764 EnsureSpace ensure_space(this); |
756 // 1110 1000 #32-bit disp. | 765 // 1110 1000 #32-bit disp. |
757 emit(0xE8); | 766 emit(0xE8); |
758 if (L->is_bound()) { | 767 if (L->is_bound()) { |
759 int offset = L->pos() - pc_offset() - sizeof(int32_t); | 768 int offset = L->pos() - pc_offset() - sizeof(int32_t); |
760 ASSERT(offset <= 0); | 769 ASSERT(offset <= 0); |
761 emitl(offset); | 770 emitl(offset); |
762 } else if (L->is_linked()) { | 771 } else if (L->is_linked()) { |
(...skipping 2418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3181 bool RelocInfo::IsCodedSpecially() { | 3190 bool RelocInfo::IsCodedSpecially() { |
3182 // The deserializer needs to know whether a pointer is specially coded. Being | 3191 // The deserializer needs to know whether a pointer is specially coded. Being |
3183 // specially coded on x64 means that it is a relative 32 bit address, as used | 3192 // specially coded on x64 means that it is a relative 32 bit address, as used |
3184 // by branch instructions. | 3193 // by branch instructions. |
3185 return (1 << rmode_) & kApplyMask; | 3194 return (1 << rmode_) & kApplyMask; |
3186 } | 3195 } |
3187 | 3196 |
3188 } } // namespace v8::internal | 3197 } } // namespace v8::internal |
3189 | 3198 |
3190 #endif // V8_TARGET_ARCH_X64 | 3199 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |