| 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" | 5 #include "vm/globals.h" |
| 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 3201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3212 EmitRegisterREX(operand, REX_W); | 3212 EmitRegisterREX(operand, REX_W); |
| 3213 } else { | 3213 } else { |
| 3214 EmitRegisterREX(operand, REX_NONE); | 3214 EmitRegisterREX(operand, REX_NONE); |
| 3215 } | 3215 } |
| 3216 EmitUint8(0xD3); | 3216 EmitUint8(0xD3); |
| 3217 EmitOperand(rm, Operand(operand)); | 3217 EmitOperand(rm, Operand(operand)); |
| 3218 } | 3218 } |
| 3219 | 3219 |
| 3220 | 3220 |
| 3221 void Assembler::LoadClassId(Register result, Register object) { | 3221 void Assembler::LoadClassId(Register result, Register object) { |
| 3222 ASSERT(RawObject::kClassIdTagBit == 16); | 3222 ASSERT(RawObject::kClassIdTagPos == 16); |
| 3223 ASSERT(RawObject::kClassIdTagSize == 16); | 3223 ASSERT(RawObject::kClassIdTagSize == 16); |
| 3224 const intptr_t class_id_offset = Object::tags_offset() + | 3224 const intptr_t class_id_offset = Object::tags_offset() + |
| 3225 RawObject::kClassIdTagBit / kBitsPerByte; | 3225 RawObject::kClassIdTagPos / kBitsPerByte; |
| 3226 movzxw(result, FieldAddress(object, class_id_offset)); | 3226 movzxw(result, FieldAddress(object, class_id_offset)); |
| 3227 } | 3227 } |
| 3228 | 3228 |
| 3229 | 3229 |
| 3230 void Assembler::LoadClassById(Register result, Register class_id) { | 3230 void Assembler::LoadClassById(Register result, Register class_id) { |
| 3231 ASSERT(result != class_id); | 3231 ASSERT(result != class_id); |
| 3232 movq(result, FieldAddress(CTX, Context::isolate_offset())); | 3232 movq(result, FieldAddress(CTX, Context::isolate_offset())); |
| 3233 const intptr_t table_offset_in_isolate = | 3233 const intptr_t table_offset_in_isolate = |
| 3234 Isolate::class_table_offset() + ClassTable::table_offset(); | 3234 Isolate::class_table_offset() + ClassTable::table_offset(); |
| 3235 movq(result, Address(result, table_offset_in_isolate)); | 3235 movq(result, Address(result, table_offset_in_isolate)); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3268 | 3268 |
| 3269 | 3269 |
| 3270 const char* Assembler::FpuRegisterName(FpuRegister reg) { | 3270 const char* Assembler::FpuRegisterName(FpuRegister reg) { |
| 3271 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); | 3271 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); |
| 3272 return xmm_reg_names[reg]; | 3272 return xmm_reg_names[reg]; |
| 3273 } | 3273 } |
| 3274 | 3274 |
| 3275 } // namespace dart | 3275 } // namespace dart |
| 3276 | 3276 |
| 3277 #endif // defined TARGET_ARCH_X64 | 3277 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |