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 956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
967 } | 967 } |
968 } | 968 } |
969 | 969 |
970 | 970 |
971 void Assembler::emit_imul(Register dst, const Operand& src, Immediate imm, | 971 void Assembler::emit_imul(Register dst, const Operand& src, Immediate imm, |
972 int size) { | 972 int size) { |
973 EnsureSpace ensure_space(this); | 973 EnsureSpace ensure_space(this); |
974 emit_rex(dst, src, size); | 974 emit_rex(dst, src, size); |
975 if (is_int8(imm.value_)) { | 975 if (is_int8(imm.value_)) { |
976 emit(0x6B); | 976 emit(0x6B); |
| 977 emit_operand(dst, src); |
| 978 emit(imm.value_); |
977 } else { | 979 } else { |
978 emit(0x69); | 980 emit(0x69); |
| 981 emit_operand(dst, src); |
| 982 emitl(imm.value_); |
979 } | 983 } |
980 emit_operand(dst, src); | |
981 emit(imm.value_); | |
982 } | 984 } |
983 | 985 |
984 | 986 |
985 void Assembler::emit_inc(Register dst, int size) { | 987 void Assembler::emit_inc(Register dst, int size) { |
986 EnsureSpace ensure_space(this); | 988 EnsureSpace ensure_space(this); |
987 emit_rex(dst, size); | 989 emit_rex(dst, size); |
988 emit(0xFF); | 990 emit(0xFF); |
989 emit_modrm(0x0, dst); | 991 emit_modrm(0x0, dst); |
990 } | 992 } |
991 | 993 |
(...skipping 2069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3061 | 3063 |
3062 | 3064 |
3063 bool RelocInfo::IsInConstantPool() { | 3065 bool RelocInfo::IsInConstantPool() { |
3064 return false; | 3066 return false; |
3065 } | 3067 } |
3066 | 3068 |
3067 | 3069 |
3068 } } // namespace v8::internal | 3070 } } // namespace v8::internal |
3069 | 3071 |
3070 #endif // V8_TARGET_ARCH_X64 | 3072 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |