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

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

Issue 306513002: Convert ElementsKind into a BitField (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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/arm64/code-stubs-arm64.cc ('k') | src/ia32/code-stubs-ia32.cc » ('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 "v8.h" 5 #include "v8.h"
6 6
7 #if V8_TARGET_ARCH_ARM64 7 #if V8_TARGET_ARCH_ARM64
8 8
9 #include "bootstrapper.h" 9 #include "bootstrapper.h"
10 #include "codegen.h" 10 #include "codegen.h"
(...skipping 3746 matching lines...) Expand 10 before | Expand all | Expand 10 after
3757 Ldr(temp, FieldMemOperand(object, HeapObject::kMapOffset)); 3757 Ldr(temp, FieldMemOperand(object, HeapObject::kMapOffset));
3758 Ldrb(temp, FieldMemOperand(temp, Map::kBitFieldOffset)); 3758 Ldrb(temp, FieldMemOperand(temp, Map::kBitFieldOffset));
3759 Tst(temp, mask); 3759 Tst(temp, mask);
3760 } 3760 }
3761 3761
3762 3762
3763 void MacroAssembler::LoadElementsKindFromMap(Register result, Register map) { 3763 void MacroAssembler::LoadElementsKindFromMap(Register result, Register map) {
3764 // Load the map's "bit field 2". 3764 // Load the map's "bit field 2".
3765 __ Ldrb(result, FieldMemOperand(map, Map::kBitField2Offset)); 3765 __ Ldrb(result, FieldMemOperand(map, Map::kBitField2Offset));
3766 // Retrieve elements_kind from bit field 2. 3766 // Retrieve elements_kind from bit field 2.
3767 __ Ubfx(result, result, Map::kElementsKindShift, Map::kElementsKindBitCount); 3767 DecodeField<Map::ElementsKindBits>(result);
3768 } 3768 }
3769 3769
3770 3770
3771 void MacroAssembler::TryGetFunctionPrototype(Register function, 3771 void MacroAssembler::TryGetFunctionPrototype(Register function,
3772 Register result, 3772 Register result,
3773 Register scratch, 3773 Register scratch,
3774 Label* miss, 3774 Label* miss,
3775 BoundFunctionAction action) { 3775 BoundFunctionAction action) {
3776 ASSERT(!AreAliased(function, result, scratch)); 3776 ASSERT(!AreAliased(function, result, scratch));
3777 3777
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after
4532 Register current = scratch0; 4532 Register current = scratch0;
4533 Label loop_again; 4533 Label loop_again;
4534 4534
4535 // Scratch contains elements pointer. 4535 // Scratch contains elements pointer.
4536 Mov(current, object); 4536 Mov(current, object);
4537 4537
4538 // Loop based on the map going up the prototype chain. 4538 // Loop based on the map going up the prototype chain.
4539 Bind(&loop_again); 4539 Bind(&loop_again);
4540 Ldr(current, FieldMemOperand(current, HeapObject::kMapOffset)); 4540 Ldr(current, FieldMemOperand(current, HeapObject::kMapOffset));
4541 Ldrb(scratch1, FieldMemOperand(current, Map::kBitField2Offset)); 4541 Ldrb(scratch1, FieldMemOperand(current, Map::kBitField2Offset));
4542 Ubfx(scratch1, scratch1, Map::kElementsKindShift, Map::kElementsKindBitCount); 4542 DecodeField<Map::ElementsKindBits>(scratch1);
4543 CompareAndBranch(scratch1, DICTIONARY_ELEMENTS, eq, found); 4543 CompareAndBranch(scratch1, DICTIONARY_ELEMENTS, eq, found);
4544 Ldr(current, FieldMemOperand(current, Map::kPrototypeOffset)); 4544 Ldr(current, FieldMemOperand(current, Map::kPrototypeOffset));
4545 CompareAndBranch(current, Operand(factory->null_value()), ne, &loop_again); 4545 CompareAndBranch(current, Operand(factory->null_value()), ne, &loop_again);
4546 } 4546 }
4547 4547
4548 4548
4549 void MacroAssembler::GetRelocatedValueLocation(Register ldr_location, 4549 void MacroAssembler::GetRelocatedValueLocation(Register ldr_location,
4550 Register result) { 4550 Register result) {
4551 ASSERT(!result.Is(ldr_location)); 4551 ASSERT(!result.Is(ldr_location));
4552 const uint32_t kLdrLitOffset_lsb = 5; 4552 const uint32_t kLdrLitOffset_lsb = 5;
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
5255 } 5255 }
5256 } 5256 }
5257 5257
5258 5258
5259 #undef __ 5259 #undef __
5260 5260
5261 5261
5262 } } // namespace v8::internal 5262 } } // namespace v8::internal
5263 5263
5264 #endif // V8_TARGET_ARCH_ARM64 5264 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm64/code-stubs-arm64.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698