Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Side by Side Diff: src/x64/macro-assembler-x64.cc

Issue 1881913002: Revert of [compiler] Add relocatable pointer constants for wasm memory references. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | test/cctest/cctest.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
1119 void MacroAssembler::Set(const Operand& dst, intptr_t x) { 1128 void MacroAssembler::Set(const Operand& dst, intptr_t x) {
1120 if (kPointerSize == kInt64Size) { 1129 if (kPointerSize == kInt64Size) {
1121 if (is_int32(x)) { 1130 if (is_int32(x)) {
1122 movp(dst, Immediate(static_cast<int32_t>(x))); 1131 movp(dst, Immediate(static_cast<int32_t>(x)));
1123 } else { 1132 } else {
1124 Set(kScratchRegister, x); 1133 Set(kScratchRegister, x);
1125 movp(dst, kScratchRegister); 1134 movp(dst, kScratchRegister);
1126 } 1135 }
1127 } else { 1136 } else {
1128 movp(dst, Immediate(static_cast<int32_t>(x))); 1137 movp(dst, Immediate(static_cast<int32_t>(x)));
(...skipping 4575 matching lines...) Expand 10 before | Expand all | Expand 10 after
5704 movl(rax, dividend); 5713 movl(rax, dividend);
5705 shrl(rax, Immediate(31)); 5714 shrl(rax, Immediate(31));
5706 addl(rdx, rax); 5715 addl(rdx, rax);
5707 } 5716 }
5708 5717
5709 5718
5710 } // namespace internal 5719 } // namespace internal
5711 } // namespace v8 5720 } // namespace v8
5712 5721
5713 #endif // V8_TARGET_ARCH_X64 5722 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.h ('k') | test/cctest/cctest.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698