| 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 #if V8_TARGET_ARCH_X64 | 5 #if V8_TARGET_ARCH_X64 |
| 6 | 6 |
| 7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
| 8 #include "src/base/division-by-constant.h" | 8 #include "src/base/division-by-constant.h" |
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1109 xorl(dst, dst); | 1109 xorl(dst, dst); |
| 1110 } else if (is_uint32(x)) { | 1110 } else if (is_uint32(x)) { |
| 1111 movl(dst, Immediate(static_cast<uint32_t>(x))); | 1111 movl(dst, Immediate(static_cast<uint32_t>(x))); |
| 1112 } else if (is_int32(x)) { | 1112 } else if (is_int32(x)) { |
| 1113 movq(dst, Immediate(static_cast<int32_t>(x))); | 1113 movq(dst, Immediate(static_cast<int32_t>(x))); |
| 1114 } else { | 1114 } else { |
| 1115 movq(dst, x); | 1115 movq(dst, x); |
| 1116 } | 1116 } |
| 1117 } | 1117 } |
| 1118 | 1118 |
| 1119 void MacroAssembler::Set(Register dst, int64_t x, RelocInfo::Mode rmode) { | |
| 1120 if (rmode == RelocInfo::WASM_MEMORY_REFERENCE) { | |
| 1121 DCHECK(x != 0); | |
| 1122 movq(dst, x, rmode); | |
| 1123 } else { | |
| 1124 DCHECK(RelocInfo::IsNone(rmode)); | |
| 1125 } | |
| 1126 } | |
| 1127 | |
| 1128 void MacroAssembler::Set(const Operand& dst, intptr_t x) { | 1119 void MacroAssembler::Set(const Operand& dst, intptr_t x) { |
| 1129 if (kPointerSize == kInt64Size) { | 1120 if (kPointerSize == kInt64Size) { |
| 1130 if (is_int32(x)) { | 1121 if (is_int32(x)) { |
| 1131 movp(dst, Immediate(static_cast<int32_t>(x))); | 1122 movp(dst, Immediate(static_cast<int32_t>(x))); |
| 1132 } else { | 1123 } else { |
| 1133 Set(kScratchRegister, x); | 1124 Set(kScratchRegister, x); |
| 1134 movp(dst, kScratchRegister); | 1125 movp(dst, kScratchRegister); |
| 1135 } | 1126 } |
| 1136 } else { | 1127 } else { |
| 1137 movp(dst, Immediate(static_cast<int32_t>(x))); | 1128 movp(dst, Immediate(static_cast<int32_t>(x))); |
| (...skipping 4575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5713 movl(rax, dividend); | 5704 movl(rax, dividend); |
| 5714 shrl(rax, Immediate(31)); | 5705 shrl(rax, Immediate(31)); |
| 5715 addl(rdx, rax); | 5706 addl(rdx, rax); |
| 5716 } | 5707 } |
| 5717 | 5708 |
| 5718 | 5709 |
| 5719 } // namespace internal | 5710 } // namespace internal |
| 5720 } // namespace v8 | 5711 } // namespace v8 |
| 5721 | 5712 |
| 5722 #endif // V8_TARGET_ARCH_X64 | 5713 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |