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

Side by Side Diff: src/arm64/full-codegen-arm64.cc

Issue 1131573006: ARM64: Enable shorten-64-to-32 warning (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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/disasm-arm64.cc ('k') | src/arm64/instructions-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 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_ARM64 7 #if V8_TARGET_ARCH_ARM64
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 int parameter_offset = StandardFrameConstants::kCallerSPOffset + 223 int parameter_offset = StandardFrameConstants::kCallerSPOffset +
224 (num_parameters - 1 - i) * kPointerSize; 224 (num_parameters - 1 - i) * kPointerSize;
225 // Load parameter from stack. 225 // Load parameter from stack.
226 __ Ldr(x10, MemOperand(fp, parameter_offset)); 226 __ Ldr(x10, MemOperand(fp, parameter_offset));
227 // Store it in the context. 227 // Store it in the context.
228 MemOperand target = ContextMemOperand(cp, var->index()); 228 MemOperand target = ContextMemOperand(cp, var->index());
229 __ Str(x10, target); 229 __ Str(x10, target);
230 230
231 // Update the write barrier. 231 // Update the write barrier.
232 if (need_write_barrier) { 232 if (need_write_barrier) {
233 __ RecordWriteContextSlot( 233 __ RecordWriteContextSlot(cp, static_cast<int>(target.offset()), x10,
234 cp, target.offset(), x10, x11, kLRHasBeenSaved, kDontSaveFPRegs); 234 x11, kLRHasBeenSaved, kDontSaveFPRegs);
235 } else if (FLAG_debug_code) { 235 } else if (FLAG_debug_code) {
236 Label done; 236 Label done;
237 __ JumpIfInNewSpace(cp, &done); 237 __ JumpIfInNewSpace(cp, &done);
238 __ Abort(kExpectedNewSpaceObject); 238 __ Abort(kExpectedNewSpaceObject);
239 __ bind(&done); 239 __ bind(&done);
240 } 240 }
241 } 241 }
242 } 242 }
243 } 243 }
244 244
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 // Block literal pools whilst emitting back edge code. 397 // Block literal pools whilst emitting back edge code.
398 Assembler::BlockPoolsScope block_const_pool(masm_); 398 Assembler::BlockPoolsScope block_const_pool(masm_);
399 Label ok; 399 Label ok;
400 400
401 DCHECK(back_edge_target->is_bound()); 401 DCHECK(back_edge_target->is_bound());
402 // We want to do a round rather than a floor of distance/kCodeSizeMultiplier 402 // We want to do a round rather than a floor of distance/kCodeSizeMultiplier
403 // to reduce the absolute error due to the integer division. To do that, 403 // to reduce the absolute error due to the integer division. To do that,
404 // we add kCodeSizeMultiplier/2 to the distance (equivalent to adding 0.5 to 404 // we add kCodeSizeMultiplier/2 to the distance (equivalent to adding 0.5 to
405 // the result). 405 // the result).
406 int distance = 406 int distance =
407 masm_->SizeOfCodeGeneratedSince(back_edge_target) + kCodeSizeMultiplier / 2; 407 static_cast<int>(masm_->SizeOfCodeGeneratedSince(back_edge_target) +
408 kCodeSizeMultiplier / 2);
408 int weight = Min(kMaxBackEdgeWeight, 409 int weight = Min(kMaxBackEdgeWeight,
409 Max(1, distance / kCodeSizeMultiplier)); 410 Max(1, distance / kCodeSizeMultiplier));
410 EmitProfilingCounterDecrement(weight); 411 EmitProfilingCounterDecrement(weight);
411 __ B(pl, &ok); 412 __ B(pl, &ok);
412 __ Call(isolate()->builtins()->InterruptCheck(), RelocInfo::CODE_TARGET); 413 __ Call(isolate()->builtins()->InterruptCheck(), RelocInfo::CODE_TARGET);
413 414
414 // Record a mapping of this PC offset to the OSR id. This is used to find 415 // Record a mapping of this PC offset to the OSR id. This is used to find
415 // the AST id from the unoptimized code in order to use it as a key into 416 // the AST id from the unoptimized code in order to use it as a key into
416 // the deoptimization input data found in the optimized code. 417 // the deoptimization input data found in the optimized code.
417 RecordBackEdge(stmt->OsrEntryId()); 418 RecordBackEdge(stmt->OsrEntryId());
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 Register scratch0, 784 Register scratch0,
784 Register scratch1) { 785 Register scratch1) {
785 DCHECK(var->IsContextSlot() || var->IsStackAllocated()); 786 DCHECK(var->IsContextSlot() || var->IsStackAllocated());
786 DCHECK(!AreAliased(src, scratch0, scratch1)); 787 DCHECK(!AreAliased(src, scratch0, scratch1));
787 MemOperand location = VarOperand(var, scratch0); 788 MemOperand location = VarOperand(var, scratch0);
788 __ Str(src, location); 789 __ Str(src, location);
789 790
790 // Emit the write barrier code if the location is in the heap. 791 // Emit the write barrier code if the location is in the heap.
791 if (var->IsContextSlot()) { 792 if (var->IsContextSlot()) {
792 // scratch0 contains the correct context. 793 // scratch0 contains the correct context.
793 __ RecordWriteContextSlot(scratch0, 794 __ RecordWriteContextSlot(scratch0, static_cast<int>(location.offset()),
794 location.offset(), 795 src, scratch1, kLRHasBeenSaved, kDontSaveFPRegs);
795 src,
796 scratch1,
797 kLRHasBeenSaved,
798 kDontSaveFPRegs);
799 } 796 }
800 } 797 }
801 798
802 799
803 void FullCodeGenerator::PrepareForBailoutBeforeSplit(Expression* expr, 800 void FullCodeGenerator::PrepareForBailoutBeforeSplit(Expression* expr,
804 bool should_normalize, 801 bool should_normalize,
805 Label* if_true, 802 Label* if_true,
806 Label* if_false) { 803 Label* if_false) {
807 // Only prepare for bailouts before splits if we're in a test 804 // Only prepare for bailouts before splits if we're in a test
808 // context. Otherwise, we let the Visit function deal with the 805 // context. Otherwise, we let the Visit function deal with the
(...skipping 4673 matching lines...) Expand 10 before | Expand all | Expand 10 after
5482 } 5479 }
5483 } 5480 }
5484 5481
5485 return INTERRUPT; 5482 return INTERRUPT;
5486 } 5483 }
5487 5484
5488 5485
5489 } } // namespace v8::internal 5486 } } // namespace v8::internal
5490 5487
5491 #endif // V8_TARGET_ARCH_ARM64 5488 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm64/disasm-arm64.cc ('k') | src/arm64/instructions-arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698