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

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

Issue 202853005: A64: ElementsKind TODOs (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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/a64/macro-assembler-a64.h ('k') | no next file » | 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 3626 matching lines...) Expand 10 before | Expand all | Expand 10 after
3637 3637
3638 void MacroAssembler::TestMapBitfield(Register object, uint64_t mask) { 3638 void MacroAssembler::TestMapBitfield(Register object, uint64_t mask) {
3639 UseScratchRegisterScope temps(this); 3639 UseScratchRegisterScope temps(this);
3640 Register temp = temps.AcquireX(); 3640 Register temp = temps.AcquireX();
3641 Ldr(temp, FieldMemOperand(object, HeapObject::kMapOffset)); 3641 Ldr(temp, FieldMemOperand(object, HeapObject::kMapOffset));
3642 Ldrb(temp, FieldMemOperand(temp, Map::kBitFieldOffset)); 3642 Ldrb(temp, FieldMemOperand(temp, Map::kBitFieldOffset));
3643 Tst(temp, mask); 3643 Tst(temp, mask);
3644 } 3644 }
3645 3645
3646 3646
3647 void MacroAssembler::LoadElementsKind(Register result, Register object) { 3647 void MacroAssembler::LoadElementsKindFromMap(Register result, Register map) {
3648 // Load map.
3649 __ Ldr(result, FieldMemOperand(object, HeapObject::kMapOffset));
3650 // Load the map's "bit field 2". 3648 // Load the map's "bit field 2".
3651 __ Ldrb(result, FieldMemOperand(result, Map::kBitField2Offset)); 3649 __ Ldrb(result, FieldMemOperand(map, Map::kBitField2Offset));
3652 // Retrieve elements_kind from bit field 2. 3650 // Retrieve elements_kind from bit field 2.
3653 __ Ubfx(result, result, Map::kElementsKindShift, Map::kElementsKindBitCount); 3651 __ Ubfx(result, result, Map::kElementsKindShift, Map::kElementsKindBitCount);
3654 } 3652 }
3655 3653
3656 3654
3657 void MacroAssembler::TryGetFunctionPrototype(Register function, 3655 void MacroAssembler::TryGetFunctionPrototype(Register function,
3658 Register result, 3656 Register result,
3659 Register scratch, 3657 Register scratch,
3660 Label* miss, 3658 Label* miss,
3661 BoundFunctionAction action) { 3659 BoundFunctionAction action) {
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
3799 STATIC_ASSERT(FAST_HOLEY_ELEMENTS == 3); 3797 STATIC_ASSERT(FAST_HOLEY_ELEMENTS == 3);
3800 Ldrb(scratch, FieldMemOperand(map, Map::kBitField2Offset)); 3798 Ldrb(scratch, FieldMemOperand(map, Map::kBitField2Offset));
3801 Cmp(scratch, Operand(Map::kMaximumBitField2FastHoleySmiElementValue)); 3799 Cmp(scratch, Operand(Map::kMaximumBitField2FastHoleySmiElementValue));
3802 // If cond==ls, set cond=hi, otherwise compare. 3800 // If cond==ls, set cond=hi, otherwise compare.
3803 Ccmp(scratch, 3801 Ccmp(scratch,
3804 Operand(Map::kMaximumBitField2FastHoleyElementValue), CFlag, hi); 3802 Operand(Map::kMaximumBitField2FastHoleyElementValue), CFlag, hi);
3805 B(hi, fail); 3803 B(hi, fail);
3806 } 3804 }
3807 3805
3808 3806
3809 void MacroAssembler::CheckFastSmiElements(Register map,
3810 Register scratch,
3811 Label* fail) {
3812 STATIC_ASSERT(FAST_SMI_ELEMENTS == 0);
3813 STATIC_ASSERT(FAST_HOLEY_SMI_ELEMENTS == 1);
3814 Ldrb(scratch, FieldMemOperand(map, Map::kBitField2Offset));
3815 Cmp(scratch, Map::kMaximumBitField2FastHoleySmiElementValue);
3816 B(hi, fail);
3817 }
3818
3819
3820 // Note: The ARM version of this clobbers elements_reg, but this version does 3807 // Note: The ARM version of this clobbers elements_reg, but this version does
3821 // not. Some uses of this in A64 assume that elements_reg will be preserved. 3808 // not. Some uses of this in A64 assume that elements_reg will be preserved.
3822 void MacroAssembler::StoreNumberToDoubleElements(Register value_reg, 3809 void MacroAssembler::StoreNumberToDoubleElements(Register value_reg,
3823 Register key_reg, 3810 Register key_reg,
3824 Register elements_reg, 3811 Register elements_reg,
3825 Register scratch1, 3812 Register scratch1,
3826 FPRegister fpscratch1, 3813 FPRegister fpscratch1,
3827 FPRegister fpscratch2, 3814 FPRegister fpscratch2,
3828 Label* fail, 3815 Label* fail,
3829 int elements_offset) { 3816 int elements_offset) {
(...skipping 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after
5140 } 5127 }
5141 } 5128 }
5142 5129
5143 5130
5144 #undef __ 5131 #undef __
5145 5132
5146 5133
5147 } } // namespace v8::internal 5134 } } // namespace v8::internal
5148 5135
5149 #endif // V8_TARGET_ARCH_A64 5136 #endif // V8_TARGET_ARCH_A64
OLDNEW
« no previous file with comments | « src/a64/macro-assembler-a64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698