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

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

Issue 1759873002: Assembler changes for enabling GrowHeap in Wasm (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Adding x64 test Created 4 years, 9 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
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 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after
1107 xorl(dst, dst); 1107 xorl(dst, dst);
1108 } else if (is_uint32(x)) { 1108 } else if (is_uint32(x)) {
1109 movl(dst, Immediate(static_cast<uint32_t>(x))); 1109 movl(dst, Immediate(static_cast<uint32_t>(x)));
1110 } else if (is_int32(x)) { 1110 } else if (is_int32(x)) {
1111 movq(dst, Immediate(static_cast<int32_t>(x))); 1111 movq(dst, Immediate(static_cast<int32_t>(x)));
1112 } else { 1112 } else {
1113 movq(dst, x); 1113 movq(dst, x);
1114 } 1114 }
1115 } 1115 }
1116 1116
1117 void MacroAssembler::Set(Register dst, int64_t x, RelocInfo::Mode rmode) {
1118 if (x == 0) {
1119 xorl(dst, dst);
Yang 2016/03/03 06:21:56 so if x == 0, we ignore the relocation mode?
titzer 2016/03/03 18:11:59 I think we shouldn't do any smartness here, since
1120 } else if (is_uint32(x)) {
1121 movl(dst, Immediate(static_cast<uint32_t>(x), rmode));
1122 } else if (is_int32(x)) {
1123 movq(dst, Immediate(static_cast<int32_t>(x), rmode));
1124 } else {
1125 movq(dst, x, rmode);
1126 }
1127 }
1117 1128
1118 void MacroAssembler::Set(const Operand& dst, intptr_t x) { 1129 void MacroAssembler::Set(const Operand& dst, intptr_t x) {
1119 if (kPointerSize == kInt64Size) { 1130 if (kPointerSize == kInt64Size) {
1120 if (is_int32(x)) { 1131 if (is_int32(x)) {
1121 movp(dst, Immediate(static_cast<int32_t>(x))); 1132 movp(dst, Immediate(static_cast<int32_t>(x)));
1122 } else { 1133 } else {
1123 Set(kScratchRegister, x); 1134 Set(kScratchRegister, x);
1124 movp(dst, kScratchRegister); 1135 movp(dst, kScratchRegister);
1125 } 1136 }
1126 } else { 1137 } else {
(...skipping 4452 matching lines...) Expand 10 before | Expand all | Expand 10 after
5579 movl(rax, dividend); 5590 movl(rax, dividend);
5580 shrl(rax, Immediate(31)); 5591 shrl(rax, Immediate(31));
5581 addl(rdx, rax); 5592 addl(rdx, rax);
5582 } 5593 }
5583 5594
5584 5595
5585 } // namespace internal 5596 } // namespace internal
5586 } // namespace v8 5597 } // namespace v8
5587 5598
5588 #endif // V8_TARGET_ARCH_X64 5599 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698