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

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

Issue 1393043003: [arm64] Fix some signed/unsigned type inconsistencies. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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/arm64/constants-arm64.h ('k') | test/cctest/test-assembler-arm64.cc » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 5 #if V8_TARGET_ARCH_ARM64
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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 202
203 // Mov instructions can't move immediate values into the stack pointer, so 203 // Mov instructions can't move immediate values into the stack pointer, so
204 // set up a temporary register, if needed. 204 // set up a temporary register, if needed.
205 UseScratchRegisterScope temps(this); 205 UseScratchRegisterScope temps(this);
206 Register temp = rd.IsSP() ? temps.AcquireSameSizeAs(rd) : rd; 206 Register temp = rd.IsSP() ? temps.AcquireSameSizeAs(rd) : rd;
207 207
208 // Iterate through the halfwords. Use movn/movz for the first non-ignored 208 // Iterate through the halfwords. Use movn/movz for the first non-ignored
209 // halfword, and movk for subsequent halfwords. 209 // halfword, and movk for subsequent halfwords.
210 DCHECK((reg_size % 16) == 0); 210 DCHECK((reg_size % 16) == 0);
211 bool first_mov_done = false; 211 bool first_mov_done = false;
212 for (unsigned i = 0; i < (rd.SizeInBits() / 16); i++) { 212 for (int i = 0; i < (rd.SizeInBits() / 16); i++) {
213 uint64_t imm16 = (imm >> (16 * i)) & 0xffffL; 213 uint64_t imm16 = (imm >> (16 * i)) & 0xffffL;
214 if (imm16 != ignored_halfword) { 214 if (imm16 != ignored_halfword) {
215 if (!first_mov_done) { 215 if (!first_mov_done) {
216 if (invert_move) { 216 if (invert_move) {
217 movn(temp, (~imm16) & 0xffffL, 16 * i); 217 movn(temp, (~imm16) & 0xffffL, 16 * i);
218 } else { 218 } else {
219 movz(temp, imm16, 16 * i); 219 movz(temp, imm16, 16 * i);
220 } 220 }
221 first_mov_done = true; 221 first_mov_done = true;
222 } else { 222 } else {
(...skipping 4841 matching lines...) Expand 10 before | Expand all | Expand 10 after
5064 } 5064 }
5065 5065
5066 5066
5067 #undef __ 5067 #undef __
5068 5068
5069 5069
5070 } // namespace internal 5070 } // namespace internal
5071 } // namespace v8 5071 } // namespace v8
5072 5072
5073 #endif // V8_TARGET_ARCH_ARM64 5073 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm64/constants-arm64.h ('k') | test/cctest/test-assembler-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698