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

Side by Side Diff: src/x64/lithium-codegen-x64.cc

Issue 159933002: A64: Synchronize with r19289. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « src/x64/full-codegen-x64.cc ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 3294 matching lines...) Expand 10 before | Expand all | Expand 10 after
3305 // Set rax to arguments count if adaption is not needed. Assumes that rax 3305 // Set rax to arguments count if adaption is not needed. Assumes that rax
3306 // is available to write to at this point. 3306 // is available to write to at this point.
3307 if (dont_adapt_arguments) { 3307 if (dont_adapt_arguments) {
3308 __ Set(rax, arity); 3308 __ Set(rax, arity);
3309 } 3309 }
3310 3310
3311 // Invoke function. 3311 // Invoke function.
3312 if (function.is_identical_to(info()->closure())) { 3312 if (function.is_identical_to(info()->closure())) {
3313 __ CallSelf(); 3313 __ CallSelf();
3314 } else { 3314 } else {
3315 __ call(FieldOperand(rdi, JSFunction::kCodeEntryOffset)); 3315 __ Call(FieldOperand(rdi, JSFunction::kCodeEntryOffset));
3316 } 3316 }
3317 3317
3318 // Set up deoptimization. 3318 // Set up deoptimization.
3319 RecordSafepointWithLazyDeopt(instr, RECORD_SIMPLE_SAFEPOINT, 0); 3319 RecordSafepointWithLazyDeopt(instr, RECORD_SIMPLE_SAFEPOINT, 0);
3320 } else { 3320 } else {
3321 // We need to adapt arguments. 3321 // We need to adapt arguments.
3322 SafepointGenerator generator( 3322 SafepointGenerator generator(
3323 this, pointers, Safepoint::kLazyDeopt); 3323 this, pointers, Safepoint::kLazyDeopt);
3324 ParameterCount count(arity); 3324 ParameterCount count(arity);
3325 ParameterCount expected(formal_parameter_count); 3325 ParameterCount expected(formal_parameter_count);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
3370 HConstant* fun_const = HConstant::cast(instr->hydrogen()->function()); 3370 HConstant* fun_const = HConstant::cast(instr->hydrogen()->function());
3371 jsfun = Handle<JSFunction>::cast(fun_const->handle(isolate())); 3371 jsfun = Handle<JSFunction>::cast(fun_const->handle(isolate()));
3372 is_self_call = jsfun.is_identical_to(info()->closure()); 3372 is_self_call = jsfun.is_identical_to(info()->closure());
3373 } 3373 }
3374 3374
3375 if (is_self_call) { 3375 if (is_self_call) {
3376 __ CallSelf(); 3376 __ CallSelf();
3377 } else { 3377 } else {
3378 Operand target = FieldOperand(rdi, JSFunction::kCodeEntryOffset); 3378 Operand target = FieldOperand(rdi, JSFunction::kCodeEntryOffset);
3379 generator.BeforeCall(__ CallSize(target)); 3379 generator.BeforeCall(__ CallSize(target));
3380 __ call(target); 3380 __ Call(target);
3381 } 3381 }
3382 generator.AfterCall(); 3382 generator.AfterCall();
3383 } 3383 }
3384 3384
3385 3385
3386 void LCodeGen::DoDeferredMathAbsTaggedHeapNumber(LMathAbs* instr) { 3386 void LCodeGen::DoDeferredMathAbsTaggedHeapNumber(LMathAbs* instr) {
3387 Register input_reg = ToRegister(instr->value()); 3387 Register input_reg = ToRegister(instr->value());
3388 __ CompareRoot(FieldOperand(input_reg, HeapObject::kMapOffset), 3388 __ CompareRoot(FieldOperand(input_reg, HeapObject::kMapOffset),
3389 Heap::kHeapNumberMapRootIndex); 3389 Heap::kHeapNumberMapRootIndex);
3390 DeoptimizeIf(not_equal, instr->environment()); 3390 DeoptimizeIf(not_equal, instr->environment());
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
3848 Representation representation = instr->representation(); 3848 Representation representation = instr->representation();
3849 3849
3850 HObjectAccess access = hinstr->access(); 3850 HObjectAccess access = hinstr->access();
3851 int offset = access.offset(); 3851 int offset = access.offset();
3852 3852
3853 if (access.IsExternalMemory()) { 3853 if (access.IsExternalMemory()) {
3854 ASSERT(!hinstr->NeedsWriteBarrier()); 3854 ASSERT(!hinstr->NeedsWriteBarrier());
3855 Register value = ToRegister(instr->value()); 3855 Register value = ToRegister(instr->value());
3856 if (instr->object()->IsConstantOperand()) { 3856 if (instr->object()->IsConstantOperand()) {
3857 ASSERT(value.is(rax)); 3857 ASSERT(value.is(rax));
3858 ASSERT(!access.representation().IsSpecialization());
3859 LConstantOperand* object = LConstantOperand::cast(instr->object()); 3858 LConstantOperand* object = LConstantOperand::cast(instr->object());
3860 __ store_rax(ToExternalReference(object)); 3859 __ store_rax(ToExternalReference(object));
3861 } else { 3860 } else {
3862 Register object = ToRegister(instr->object()); 3861 Register object = ToRegister(instr->object());
3863 __ Store(MemOperand(object, offset), value, representation); 3862 __ Store(MemOperand(object, offset), value, representation);
3864 } 3863 }
3865 return; 3864 return;
3866 } 3865 }
3867 3866
3868 Register object = ToRegister(instr->object()); 3867 Register object = ToRegister(instr->object());
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
3922 3921
3923 Register write_register = object; 3922 Register write_register = object;
3924 if (!access.IsInobject()) { 3923 if (!access.IsInobject()) {
3925 write_register = ToRegister(instr->temp()); 3924 write_register = ToRegister(instr->temp());
3926 __ movp(write_register, FieldOperand(object, JSObject::kPropertiesOffset)); 3925 __ movp(write_register, FieldOperand(object, JSObject::kPropertiesOffset));
3927 } 3926 }
3928 3927
3929 if (representation.IsSmi() && 3928 if (representation.IsSmi() &&
3930 hinstr->value()->representation().IsInteger32()) { 3929 hinstr->value()->representation().IsInteger32()) {
3931 ASSERT(hinstr->store_mode() == STORE_TO_INITIALIZED_ENTRY); 3930 ASSERT(hinstr->store_mode() == STORE_TO_INITIALIZED_ENTRY);
3931 #ifdef DEBUG
3932 __ movq(kScratchRegister, FieldOperand(write_register, offset));
3933 __ AssertSmi(kScratchRegister);
3934 #endif
3932 // Store int value directly to upper half of the smi. 3935 // Store int value directly to upper half of the smi.
3933 STATIC_ASSERT(kSmiTag == 0); 3936 STATIC_ASSERT(kSmiTag == 0);
3934 STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 32); 3937 STATIC_ASSERT(kSmiTagSize + kSmiShiftSize == 32);
3935 offset += kPointerSize / 2; 3938 offset += kPointerSize / 2;
3936 representation = Representation::Integer32(); 3939 representation = Representation::Integer32();
3937 } 3940 }
3938 3941
3939 Operand operand = FieldOperand(write_register, offset); 3942 Operand operand = FieldOperand(write_register, offset);
3940 3943
3941 if (instr->value()->IsRegister()) { 3944 if (instr->value()->IsRegister()) {
(...skipping 1603 matching lines...) Expand 10 before | Expand all | Expand 10 after
5545 FixedArray::kHeaderSize - kPointerSize)); 5548 FixedArray::kHeaderSize - kPointerSize));
5546 __ bind(&done); 5549 __ bind(&done);
5547 } 5550 }
5548 5551
5549 5552
5550 #undef __ 5553 #undef __
5551 5554
5552 } } // namespace v8::internal 5555 } } // namespace v8::internal
5553 5556
5554 #endif // V8_TARGET_ARCH_X64 5557 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/full-codegen-x64.cc ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698