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

Side by Side Diff: src/s390/macro-assembler-s390.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/s390/macro-assembler-s390.h ('k') | src/x64/macro-assembler-x64.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 <assert.h> // For assert 5 #include <assert.h> // For assert
6 #include <limits.h> // For LONG_MIN, LONG_MAX. 6 #include <limits.h> // For LONG_MIN, LONG_MAX.
7 7
8 #if V8_TARGET_ARCH_S390 8 #if V8_TARGET_ARCH_S390
9 9
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 2903 matching lines...) Expand 10 before | Expand all | Expand 10 after
2914 // Initialize the JSValue. 2914 // Initialize the JSValue.
2915 LoadGlobalFunctionInitialMap(constructor, scratch1, scratch2); 2915 LoadGlobalFunctionInitialMap(constructor, scratch1, scratch2);
2916 StoreP(scratch1, FieldMemOperand(result, HeapObject::kMapOffset), r0); 2916 StoreP(scratch1, FieldMemOperand(result, HeapObject::kMapOffset), r0);
2917 LoadRoot(scratch1, Heap::kEmptyFixedArrayRootIndex); 2917 LoadRoot(scratch1, Heap::kEmptyFixedArrayRootIndex);
2918 StoreP(scratch1, FieldMemOperand(result, JSObject::kPropertiesOffset), r0); 2918 StoreP(scratch1, FieldMemOperand(result, JSObject::kPropertiesOffset), r0);
2919 StoreP(scratch1, FieldMemOperand(result, JSObject::kElementsOffset), r0); 2919 StoreP(scratch1, FieldMemOperand(result, JSObject::kElementsOffset), r0);
2920 StoreP(value, FieldMemOperand(result, JSValue::kValueOffset), r0); 2920 StoreP(value, FieldMemOperand(result, JSValue::kValueOffset), r0);
2921 STATIC_ASSERT(JSValue::kSize == 4 * kPointerSize); 2921 STATIC_ASSERT(JSValue::kSize == 4 * kPointerSize);
2922 } 2922 }
2923 2923
2924 void MacroAssembler::CopyBytes(Register src, Register dst, Register length,
2925 Register scratch) {
2926 Label big_loop, left_bytes, done, fake_call;
2927
2928 DCHECK(!scratch.is(r0));
2929
2930 // big loop moves 256 bytes at a time
2931 bind(&big_loop);
2932 CmpP(length, Operand(static_cast<intptr_t>(0x100)));
2933 blt(&left_bytes);
2934
2935 mvc(MemOperand(dst), MemOperand(src), 0x100);
2936
2937 AddP(src, Operand(static_cast<intptr_t>(0x100)));
2938 AddP(dst, Operand(static_cast<intptr_t>(0x100)));
2939 SubP(length, Operand(static_cast<intptr_t>(0x100)));
2940 b(&big_loop);
2941
2942 bind(&left_bytes);
2943 CmpP(length, Operand::Zero());
2944 beq(&done);
2945
2946 // TODO(john.yan): More optimal version is to use MVC
2947 // Sequence below has some undiagnosed issue.
2948 /*
2949 b(scratch, &fake_call); // use brasl to Save mvc addr to scratch
2950 mvc(MemOperand(dst), MemOperand(src), 1);
2951 bind(&fake_call);
2952 SubP(length, Operand(static_cast<intptr_t>(-1)));
2953 ex(length, MemOperand(scratch)); // execute mvc instr above
2954 AddP(src, length);
2955 AddP(dst, length);
2956 AddP(src, Operand(static_cast<intptr_t>(0x1)));
2957 AddP(dst, Operand(static_cast<intptr_t>(0x1)));
2958 */
2959
2960 mvc(MemOperand(dst), MemOperand(src), 1);
2961 AddP(src, Operand(static_cast<intptr_t>(0x1)));
2962 AddP(dst, Operand(static_cast<intptr_t>(0x1)));
2963 SubP(length, Operand(static_cast<intptr_t>(0x1)));
2964
2965 b(&left_bytes);
2966 bind(&done);
2967 }
2968
2969 void MacroAssembler::InitializeNFieldsWithFiller(Register current_address, 2924 void MacroAssembler::InitializeNFieldsWithFiller(Register current_address,
2970 Register count, 2925 Register count,
2971 Register filler) { 2926 Register filler) {
2972 Label loop; 2927 Label loop;
2973 bind(&loop); 2928 bind(&loop);
2974 StoreP(filler, MemOperand(current_address)); 2929 StoreP(filler, MemOperand(current_address));
2975 AddP(current_address, current_address, Operand(kPointerSize)); 2930 AddP(current_address, current_address, Operand(kPointerSize));
2976 BranchOnCount(r1, &loop); 2931 BranchOnCount(r1, &loop);
2977 } 2932 }
2978 2933
(...skipping 2453 matching lines...) Expand 10 before | Expand all | Expand 10 after
5432 } 5387 }
5433 if (mag.shift > 0) ShiftRightArith(result, result, Operand(mag.shift)); 5388 if (mag.shift > 0) ShiftRightArith(result, result, Operand(mag.shift));
5434 ExtractBit(r0, dividend, 31); 5389 ExtractBit(r0, dividend, 31);
5435 AddP(result, r0); 5390 AddP(result, r0);
5436 } 5391 }
5437 5392
5438 } // namespace internal 5393 } // namespace internal
5439 } // namespace v8 5394 } // namespace v8
5440 5395
5441 #endif // V8_TARGET_ARCH_S390 5396 #endif // V8_TARGET_ARCH_S390
OLDNEW
« no previous file with comments | « src/s390/macro-assembler-s390.h ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698