OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/globals.h" // NOLINT | 5 #include "vm/globals.h" // NOLINT |
6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
7 | 7 |
8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
9 #include "vm/cpu.h" | 9 #include "vm/cpu.h" |
10 #include "vm/heap.h" | 10 #include "vm/heap.h" |
(...skipping 3684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3695 // the case that object is a Smi. | 3695 // the case that object is a Smi. |
3696 LoadObject(result, Object::null_object()); | 3696 LoadObject(result, Object::null_object()); |
3697 // Check if the object is a Smi. | 3697 // Check if the object is a Smi. |
3698 testq(object, Immediate(kSmiTagMask)); | 3698 testq(object, Immediate(kSmiTagMask)); |
3699 // If the object *is* a Smi, use the null object instead. | 3699 // If the object *is* a Smi, use the null object instead. |
3700 cmoveq(object, result); | 3700 cmoveq(object, result); |
3701 // Loads either the cid of the object if it isn't a Smi, or the cid of null | 3701 // Loads either the cid of the object if it isn't a Smi, or the cid of null |
3702 // if it is a Smi, which will be ignored. | 3702 // if it is a Smi, which will be ignored. |
3703 LoadClassId(result, object); | 3703 LoadClassId(result, object); |
3704 | 3704 |
3705 movq(object, Immediate(kSmiCid)); | 3705 movq(TMP, Immediate(kSmiCid)); |
3706 // If object is a Smi, move the Smi cid into result. o/w leave alone. | 3706 // If object is a Smi, move the Smi cid into result. o/w leave alone. |
3707 cmoveq(result, object); | 3707 cmoveq(result, TMP); |
3708 } | 3708 } |
3709 | 3709 |
3710 | 3710 |
3711 void Assembler::LoadTaggedClassIdMayBeSmi(Register result, Register object) { | 3711 void Assembler::LoadTaggedClassIdMayBeSmi(Register result, Register object) { |
3712 LoadClassIdMayBeSmi(result, object); | 3712 LoadClassIdMayBeSmi(result, object); |
3713 // Finally, tag the result. | 3713 // Finally, tag the result. |
3714 SmiTag(result); | 3714 SmiTag(result); |
3715 } | 3715 } |
3716 | 3716 |
3717 | 3717 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3784 | 3784 |
3785 | 3785 |
3786 const char* Assembler::FpuRegisterName(FpuRegister reg) { | 3786 const char* Assembler::FpuRegisterName(FpuRegister reg) { |
3787 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); | 3787 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); |
3788 return xmm_reg_names[reg]; | 3788 return xmm_reg_names[reg]; |
3789 } | 3789 } |
3790 | 3790 |
3791 } // namespace dart | 3791 } // namespace dart |
3792 | 3792 |
3793 #endif // defined TARGET_ARCH_X64 | 3793 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |