OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_X64 | 7 #if V8_TARGET_ARCH_X64 |
8 | 8 |
9 #include "bootstrapper.h" | 9 #include "bootstrapper.h" |
10 #include "codegen.h" | 10 #include "codegen.h" |
(...skipping 3466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3477 } | 3477 } |
3478 | 3478 |
3479 | 3479 |
3480 void MacroAssembler::LoadInstanceDescriptors(Register map, | 3480 void MacroAssembler::LoadInstanceDescriptors(Register map, |
3481 Register descriptors) { | 3481 Register descriptors) { |
3482 movp(descriptors, FieldOperand(map, Map::kDescriptorsOffset)); | 3482 movp(descriptors, FieldOperand(map, Map::kDescriptorsOffset)); |
3483 } | 3483 } |
3484 | 3484 |
3485 | 3485 |
3486 void MacroAssembler::NumberOfOwnDescriptors(Register dst, Register map) { | 3486 void MacroAssembler::NumberOfOwnDescriptors(Register dst, Register map) { |
3487 movp(dst, FieldOperand(map, Map::kBitField3Offset)); | 3487 movl(dst, FieldOperand(map, Map::kBitField3Offset)); |
3488 DecodeField<Map::NumberOfOwnDescriptorsBits>(dst); | 3488 DecodeField<Map::NumberOfOwnDescriptorsBits>(dst); |
3489 } | 3489 } |
3490 | 3490 |
3491 | 3491 |
3492 void MacroAssembler::EnumLength(Register dst, Register map) { | 3492 void MacroAssembler::EnumLength(Register dst, Register map) { |
3493 STATIC_ASSERT(Map::EnumLengthBits::kShift == 0); | 3493 STATIC_ASSERT(Map::EnumLengthBits::kShift == 0); |
3494 movp(dst, FieldOperand(map, Map::kBitField3Offset)); | 3494 movl(dst, FieldOperand(map, Map::kBitField3Offset)); |
3495 Move(kScratchRegister, Smi::FromInt(Map::EnumLengthBits::kMask)); | 3495 andl(dst, Immediate(Map::EnumLengthBits::kMask)); |
3496 andp(dst, kScratchRegister); | 3496 Integer32ToSmi(dst, dst); |
3497 } | 3497 } |
3498 | 3498 |
3499 | 3499 |
3500 void MacroAssembler::DispatchMap(Register obj, | 3500 void MacroAssembler::DispatchMap(Register obj, |
3501 Register unused, | 3501 Register unused, |
3502 Handle<Map> map, | 3502 Handle<Map> map, |
3503 Handle<Code> success, | 3503 Handle<Code> success, |
3504 SmiCheckType smi_check_type) { | 3504 SmiCheckType smi_check_type) { |
3505 Label fail; | 3505 Label fail; |
3506 if (smi_check_type == DO_SMI_CHECK) { | 3506 if (smi_check_type == DO_SMI_CHECK) { |
(...skipping 1445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4952 } | 4952 } |
4953 j(cc, condition_met, condition_met_distance); | 4953 j(cc, condition_met, condition_met_distance); |
4954 } | 4954 } |
4955 | 4955 |
4956 | 4956 |
4957 void MacroAssembler::CheckMapDeprecated(Handle<Map> map, | 4957 void MacroAssembler::CheckMapDeprecated(Handle<Map> map, |
4958 Register scratch, | 4958 Register scratch, |
4959 Label* if_deprecated) { | 4959 Label* if_deprecated) { |
4960 if (map->CanBeDeprecated()) { | 4960 if (map->CanBeDeprecated()) { |
4961 Move(scratch, map); | 4961 Move(scratch, map); |
4962 movp(scratch, FieldOperand(scratch, Map::kBitField3Offset)); | 4962 movl(scratch, FieldOperand(scratch, Map::kBitField3Offset)); |
4963 SmiToInteger32(scratch, scratch); | 4963 andl(scratch, Immediate(Map::Deprecated::kMask)); |
4964 andp(scratch, Immediate(Map::Deprecated::kMask)); | |
4965 j(not_zero, if_deprecated); | 4964 j(not_zero, if_deprecated); |
4966 } | 4965 } |
4967 } | 4966 } |
4968 | 4967 |
4969 | 4968 |
4970 void MacroAssembler::JumpIfBlack(Register object, | 4969 void MacroAssembler::JumpIfBlack(Register object, |
4971 Register bitmap_scratch, | 4970 Register bitmap_scratch, |
4972 Register mask_scratch, | 4971 Register mask_scratch, |
4973 Label* on_black, | 4972 Label* on_black, |
4974 Label::Distance on_black_distance) { | 4973 Label::Distance on_black_distance) { |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5235 if (ms.shift() > 0) sarl(rdx, Immediate(ms.shift())); | 5234 if (ms.shift() > 0) sarl(rdx, Immediate(ms.shift())); |
5236 movl(rax, dividend); | 5235 movl(rax, dividend); |
5237 shrl(rax, Immediate(31)); | 5236 shrl(rax, Immediate(31)); |
5238 addl(rdx, rax); | 5237 addl(rdx, rax); |
5239 } | 5238 } |
5240 | 5239 |
5241 | 5240 |
5242 } } // namespace v8::internal | 5241 } } // namespace v8::internal |
5243 | 5242 |
5244 #endif // V8_TARGET_ARCH_X64 | 5243 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |