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 3077 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3088 #if defined(DEBUG) | 3088 #if defined(DEBUG) |
3089 Label done; | 3089 Label done; |
3090 testq(value, Immediate(kHeapObjectTag)); | 3090 testq(value, Immediate(kHeapObjectTag)); |
3091 j(ZERO, &done); | 3091 j(ZERO, &done); |
3092 Stop("Smi expected"); | 3092 Stop("Smi expected"); |
3093 Bind(&done); | 3093 Bind(&done); |
3094 #endif // defined(DEBUG) | 3094 #endif // defined(DEBUG) |
3095 } | 3095 } |
3096 | 3096 |
3097 | 3097 |
3098 void Assembler::ZeroSmiField(const Address& dest) { | 3098 void Assembler::ZeroInitSmiField(const Address& dest) { |
3099 // TODO(koda): Add VerifySmi once we distinguish initalization. | 3099 // TODO(koda): Add VerifySmi once we distinguish initalization. |
3100 VerifyHeapWord(dest); | 3100 VerifyHeapWord(dest); |
3101 Immediate zero(Smi::RawValue(0)); | 3101 Immediate zero(Smi::RawValue(0)); |
3102 movq(dest, zero); | 3102 movq(dest, zero); |
3103 if (VerifiedMemory::enabled()) { | 3103 if (VerifiedMemory::enabled()) { |
3104 Register temp = RCX; | 3104 Register temp = RCX; |
3105 pushq(temp); | 3105 pushq(temp); |
3106 leaq(temp, dest); | 3106 leaq(temp, dest); |
3107 movq(Address(temp, VerifiedMemory::offset()), zero); | 3107 movq(Address(temp, VerifiedMemory::offset()), zero); |
3108 popq(temp); | 3108 popq(temp); |
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3929 | 3929 |
3930 | 3930 |
3931 const char* Assembler::FpuRegisterName(FpuRegister reg) { | 3931 const char* Assembler::FpuRegisterName(FpuRegister reg) { |
3932 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); | 3932 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); |
3933 return xmm_reg_names[reg]; | 3933 return xmm_reg_names[reg]; |
3934 } | 3934 } |
3935 | 3935 |
3936 } // namespace dart | 3936 } // namespace dart |
3937 | 3937 |
3938 #endif // defined TARGET_ARCH_X64 | 3938 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |