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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/macro-assembler.h" | 10 #include "src/macro-assembler.h" |
(...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
935 emit_modrm(dst, src); | 935 emit_modrm(dst, src); |
936 emit(imm.value_); | 936 emit(imm.value_); |
937 } else { | 937 } else { |
938 emit(0x69); | 938 emit(0x69); |
939 emit_modrm(dst, src); | 939 emit_modrm(dst, src); |
940 emitl(imm.value_); | 940 emitl(imm.value_); |
941 } | 941 } |
942 } | 942 } |
943 | 943 |
944 | 944 |
| 945 void Assembler::emit_imul(Register dst, const Operand& src, Immediate imm, |
| 946 int size) { |
| 947 EnsureSpace ensure_space(this); |
| 948 emit_rex(dst, src, size); |
| 949 if (is_int8(imm.value_)) { |
| 950 emit(0x6B); |
| 951 } else { |
| 952 emit(0x69); |
| 953 } |
| 954 emit_operand(dst, src); |
| 955 emit(imm.value_); |
| 956 } |
| 957 |
| 958 |
945 void Assembler::emit_inc(Register dst, int size) { | 959 void Assembler::emit_inc(Register dst, int size) { |
946 EnsureSpace ensure_space(this); | 960 EnsureSpace ensure_space(this); |
947 emit_rex(dst, size); | 961 emit_rex(dst, size); |
948 emit(0xFF); | 962 emit(0xFF); |
949 emit_modrm(0x0, dst); | 963 emit_modrm(0x0, dst); |
950 } | 964 } |
951 | 965 |
952 | 966 |
953 void Assembler::emit_inc(const Operand& dst, int size) { | 967 void Assembler::emit_inc(const Operand& dst, int size) { |
954 EnsureSpace ensure_space(this); | 968 EnsureSpace ensure_space(this); |
(...skipping 2056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3011 | 3025 |
3012 | 3026 |
3013 bool RelocInfo::IsInConstantPool() { | 3027 bool RelocInfo::IsInConstantPool() { |
3014 return false; | 3028 return false; |
3015 } | 3029 } |
3016 | 3030 |
3017 | 3031 |
3018 } } // namespace v8::internal | 3032 } } // namespace v8::internal |
3019 | 3033 |
3020 #endif // V8_TARGET_ARCH_X64 | 3034 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |