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

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

Issue 2434753003: [cleanup] Delete MacroAssembler::CopyBytes, it is dead code (Closed)
Patch Set: update .golden files Created 4 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/arm/macro-assembler-arm.h ('k') | src/arm64/macro-assembler-arm64.h » ('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 #include <limits.h> // For LONG_MIN, LONG_MAX. 5 #include <limits.h> // For LONG_MIN, LONG_MAX.
6 6
7 #if V8_TARGET_ARCH_ARM 7 #if V8_TARGET_ARCH_ARM
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/division-by-constant.h" 10 #include "src/base/division-by-constant.h"
(...skipping 3227 matching lines...) Expand 10 before | Expand all | Expand 10 after
3238 // Initialize the JSValue. 3238 // Initialize the JSValue.
3239 LoadGlobalFunctionInitialMap(constructor, scratch1, scratch2); 3239 LoadGlobalFunctionInitialMap(constructor, scratch1, scratch2);
3240 str(scratch1, FieldMemOperand(result, HeapObject::kMapOffset)); 3240 str(scratch1, FieldMemOperand(result, HeapObject::kMapOffset));
3241 LoadRoot(scratch1, Heap::kEmptyFixedArrayRootIndex); 3241 LoadRoot(scratch1, Heap::kEmptyFixedArrayRootIndex);
3242 str(scratch1, FieldMemOperand(result, JSObject::kPropertiesOffset)); 3242 str(scratch1, FieldMemOperand(result, JSObject::kPropertiesOffset));
3243 str(scratch1, FieldMemOperand(result, JSObject::kElementsOffset)); 3243 str(scratch1, FieldMemOperand(result, JSObject::kElementsOffset));
3244 str(value, FieldMemOperand(result, JSValue::kValueOffset)); 3244 str(value, FieldMemOperand(result, JSValue::kValueOffset));
3245 STATIC_ASSERT(JSValue::kSize == 4 * kPointerSize); 3245 STATIC_ASSERT(JSValue::kSize == 4 * kPointerSize);
3246 } 3246 }
3247 3247
3248
3249 void MacroAssembler::CopyBytes(Register src,
3250 Register dst,
3251 Register length,
3252 Register scratch) {
3253 Label align_loop_1, word_loop, byte_loop, byte_loop_1, done;
3254
3255 // Align src before copying in word size chunks.
3256 cmp(length, Operand(kPointerSize));
3257 b(le, &byte_loop);
3258
3259 bind(&align_loop_1);
3260 tst(src, Operand(kPointerSize - 1));
3261 b(eq, &word_loop);
3262 ldrb(scratch, MemOperand(src, 1, PostIndex));
3263 strb(scratch, MemOperand(dst, 1, PostIndex));
3264 sub(length, length, Operand(1), SetCC);
3265 b(&align_loop_1);
3266 // Copy bytes in word size chunks.
3267 bind(&word_loop);
3268 if (emit_debug_code()) {
3269 tst(src, Operand(kPointerSize - 1));
3270 Assert(eq, kExpectingAlignmentForCopyBytes);
3271 }
3272 cmp(length, Operand(kPointerSize));
3273 b(lt, &byte_loop);
3274 ldr(scratch, MemOperand(src, kPointerSize, PostIndex));
3275 str(scratch, MemOperand(dst, kPointerSize, PostIndex));
3276 sub(length, length, Operand(kPointerSize));
3277 b(&word_loop);
3278
3279 // Copy the last bytes if any left.
3280 bind(&byte_loop);
3281 cmp(length, Operand::Zero());
3282 b(eq, &done);
3283 bind(&byte_loop_1);
3284 ldrb(scratch, MemOperand(src, 1, PostIndex));
3285 strb(scratch, MemOperand(dst, 1, PostIndex));
3286 sub(length, length, Operand(1), SetCC);
3287 b(ne, &byte_loop_1);
3288 bind(&done);
3289 }
3290
3291
3292 void MacroAssembler::InitializeFieldsWithFiller(Register current_address, 3248 void MacroAssembler::InitializeFieldsWithFiller(Register current_address,
3293 Register end_address, 3249 Register end_address,
3294 Register filler) { 3250 Register filler) {
3295 Label loop, entry; 3251 Label loop, entry;
3296 b(&entry); 3252 b(&entry);
3297 bind(&loop); 3253 bind(&loop);
3298 str(filler, MemOperand(current_address, kPointerSize, PostIndex)); 3254 str(filler, MemOperand(current_address, kPointerSize, PostIndex));
3299 bind(&entry); 3255 bind(&entry);
3300 cmp(current_address, end_address); 3256 cmp(current_address, end_address);
3301 b(lo, &loop); 3257 b(lo, &loop);
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
4062 } 4018 }
4063 } 4019 }
4064 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); 4020 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift));
4065 add(result, result, Operand(dividend, LSR, 31)); 4021 add(result, result, Operand(dividend, LSR, 31));
4066 } 4022 }
4067 4023
4068 } // namespace internal 4024 } // namespace internal
4069 } // namespace v8 4025 } // namespace v8
4070 4026
4071 #endif // V8_TARGET_ARCH_ARM 4027 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.h ('k') | src/arm64/macro-assembler-arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698