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

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

Issue 139973004: A64: Synchronize with r15814. (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/ic-x64.cc ('k') | src/x64/lithium-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 903 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 case CodeStub::SubString: { 914 case CodeStub::SubString: {
915 SubStringStub stub; 915 SubStringStub stub;
916 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); 916 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
917 break; 917 break;
918 } 918 }
919 case CodeStub::NumberToString: { 919 case CodeStub::NumberToString: {
920 NumberToStringStub stub; 920 NumberToStringStub stub;
921 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); 921 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
922 break; 922 break;
923 } 923 }
924 case CodeStub::StringAdd: {
925 StringAddStub stub(NO_STRING_ADD_FLAGS);
926 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
927 break;
928 }
929 case CodeStub::StringCompare: { 924 case CodeStub::StringCompare: {
930 StringCompareStub stub; 925 StringCompareStub stub;
931 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); 926 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
932 break; 927 break;
933 } 928 }
934 case CodeStub::TranscendentalCache: { 929 case CodeStub::TranscendentalCache: {
935 TranscendentalCacheStub stub(instr->transcendental_type(), 930 TranscendentalCacheStub stub(instr->transcendental_type(),
936 TranscendentalCacheStub::TAGGED); 931 TranscendentalCacheStub::TAGGED);
937 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); 932 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
938 break; 933 break;
(...skipping 1657 matching lines...) Expand 10 before | Expand all | Expand 10 after
2596 ASSERT(ToRegister(instr->value()).is(rax)); 2591 ASSERT(ToRegister(instr->value()).is(rax));
2597 2592
2598 __ Move(rcx, instr->name()); 2593 __ Move(rcx, instr->name());
2599 Handle<Code> ic = (instr->strict_mode_flag() == kStrictMode) 2594 Handle<Code> ic = (instr->strict_mode_flag() == kStrictMode)
2600 ? isolate()->builtins()->StoreIC_Initialize_Strict() 2595 ? isolate()->builtins()->StoreIC_Initialize_Strict()
2601 : isolate()->builtins()->StoreIC_Initialize(); 2596 : isolate()->builtins()->StoreIC_Initialize();
2602 CallCode(ic, RelocInfo::CODE_TARGET_CONTEXT, instr); 2597 CallCode(ic, RelocInfo::CODE_TARGET_CONTEXT, instr);
2603 } 2598 }
2604 2599
2605 2600
2601 void LCodeGen::DoLinkObjectInList(LLinkObjectInList* instr) {
2602 Register object = ToRegister(instr->object());
2603 ExternalReference sites_list_address = instr->GetReference(isolate());
2604 __ Load(kScratchRegister, sites_list_address);
2605 __ movq(FieldOperand(object, instr->hydrogen()->store_field().offset()),
2606 kScratchRegister);
2607 __ Store(sites_list_address, object);
2608 }
2609
2610
2606 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { 2611 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) {
2607 Register context = ToRegister(instr->context()); 2612 Register context = ToRegister(instr->context());
2608 Register result = ToRegister(instr->result()); 2613 Register result = ToRegister(instr->result());
2609 __ movq(result, ContextOperand(context, instr->slot_index())); 2614 __ movq(result, ContextOperand(context, instr->slot_index()));
2610 if (instr->hydrogen()->RequiresHoleCheck()) { 2615 if (instr->hydrogen()->RequiresHoleCheck()) {
2611 __ CompareRoot(result, Heap::kTheHoleValueRootIndex); 2616 __ CompareRoot(result, Heap::kTheHoleValueRootIndex);
2612 if (instr->hydrogen()->DeoptimizesOnHole()) { 2617 if (instr->hydrogen()->DeoptimizesOnHole()) {
2613 DeoptimizeIf(equal, instr->environment()); 2618 DeoptimizeIf(equal, instr->environment());
2614 } else { 2619 } else {
2615 Label is_not_hole; 2620 Label is_not_hole;
(...skipping 1683 matching lines...) Expand 10 before | Expand all | Expand 10 after
4299 } else { 4304 } else {
4300 UNREACHABLE(); 4305 UNREACHABLE();
4301 } 4306 }
4302 __ bind(&not_applicable); 4307 __ bind(&not_applicable);
4303 } 4308 }
4304 4309
4305 4310
4306 void LCodeGen::DoTrapAllocationMemento(LTrapAllocationMemento* instr) { 4311 void LCodeGen::DoTrapAllocationMemento(LTrapAllocationMemento* instr) {
4307 Register object = ToRegister(instr->object()); 4312 Register object = ToRegister(instr->object());
4308 Register temp = ToRegister(instr->temp()); 4313 Register temp = ToRegister(instr->temp());
4309 __ TestJSArrayForAllocationSiteInfo(object, temp); 4314 __ TestJSArrayForAllocationMemento(object, temp);
4310 DeoptimizeIf(equal, instr->environment()); 4315 DeoptimizeIf(equal, instr->environment());
4311 } 4316 }
4312 4317
4313 4318
4314 void LCodeGen::DoStringAdd(LStringAdd* instr) { 4319 void LCodeGen::DoStringAdd(LStringAdd* instr) {
4315 EmitPushTaggedOperand(instr->left()); 4320 EmitPushTaggedOperand(instr->left());
4316 EmitPushTaggedOperand(instr->right()); 4321 EmitPushTaggedOperand(instr->right());
4317 StringAddStub stub(NO_STRING_CHECK_IN_STUB); 4322 StringAddStub stub(instr->hydrogen()->flags());
4318 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); 4323 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr);
4319 } 4324 }
4320 4325
4321 4326
4322 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) { 4327 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) {
4323 class DeferredStringCharCodeAt: public LDeferredCode { 4328 class DeferredStringCharCodeAt: public LDeferredCode {
4324 public: 4329 public:
4325 DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr) 4330 DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr)
4326 : LDeferredCode(codegen), instr_(instr) { } 4331 : LDeferredCode(codegen), instr_(instr) { }
4327 virtual void Generate() { codegen()->DoDeferredStringCharCodeAt(instr_); } 4332 virtual void Generate() { codegen()->DoDeferredStringCharCodeAt(instr_); }
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after
5063 5068
5064 if (instr->size()->IsConstantOperand()) { 5069 if (instr->size()->IsConstantOperand()) {
5065 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); 5070 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
5066 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); 5071 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags);
5067 } else { 5072 } else {
5068 Register size = ToRegister(instr->size()); 5073 Register size = ToRegister(instr->size());
5069 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); 5074 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags);
5070 } 5075 }
5071 5076
5072 __ bind(deferred->exit()); 5077 __ bind(deferred->exit());
5078
5079 if (instr->hydrogen()->MustPrefillWithFiller()) {
5080 if (instr->size()->IsConstantOperand()) {
5081 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
5082 __ movl(temp, Immediate((size / kPointerSize) - 1));
5083 } else {
5084 temp = ToRegister(instr->size());
5085 __ sar(temp, Immediate(kPointerSizeLog2));
5086 __ decl(temp);
5087 }
5088 Label loop;
5089 __ bind(&loop);
5090 __ Move(FieldOperand(result, temp, times_pointer_size, 0),
5091 isolate()->factory()->one_pointer_filler_map());
5092 __ decl(temp);
5093 __ j(not_zero, &loop);
5094 }
5073 } 5095 }
5074 5096
5075 5097
5076 void LCodeGen::DoDeferredAllocate(LAllocate* instr) { 5098 void LCodeGen::DoDeferredAllocate(LAllocate* instr) {
5077 Register result = ToRegister(instr->result()); 5099 Register result = ToRegister(instr->result());
5078 5100
5079 // TODO(3095996): Get rid of this. For now, we need to make the 5101 // TODO(3095996): Get rid of this. For now, we need to make the
5080 // result register contain a valid pointer because it is already 5102 // result register contain a valid pointer because it is already
5081 // contained in the register pointer map. 5103 // contained in the register pointer map.
5082 __ Move(result, Smi::FromInt(0)); 5104 __ Move(result, Smi::FromInt(0));
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
5516 FixedArray::kHeaderSize - kPointerSize)); 5538 FixedArray::kHeaderSize - kPointerSize));
5517 __ bind(&done); 5539 __ bind(&done);
5518 } 5540 }
5519 5541
5520 5542
5521 #undef __ 5543 #undef __
5522 5544
5523 } } // namespace v8::internal 5545 } } // namespace v8::internal
5524 5546
5525 #endif // V8_TARGET_ARCH_X64 5547 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/ic-x64.cc ('k') | src/x64/lithium-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698