| 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_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
| 7 | 7 |
| 8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
| 9 #include "vm/code_generator.h" | 9 #include "vm/code_generator.h" |
| 10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
| (...skipping 2583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2594 const Operand& operand, | 2594 const Operand& operand, |
| 2595 Register shifter) { | 2595 Register shifter) { |
| 2596 AssemblerBuffer::EnsureCapacity ensured(&buffer_); | 2596 AssemblerBuffer::EnsureCapacity ensured(&buffer_); |
| 2597 ASSERT(shifter == ECX); | 2597 ASSERT(shifter == ECX); |
| 2598 EmitUint8(0xD3); | 2598 EmitUint8(0xD3); |
| 2599 EmitOperand(rm, Operand(operand)); | 2599 EmitOperand(rm, Operand(operand)); |
| 2600 } | 2600 } |
| 2601 | 2601 |
| 2602 | 2602 |
| 2603 void Assembler::LoadClassId(Register result, Register object) { | 2603 void Assembler::LoadClassId(Register result, Register object) { |
| 2604 ASSERT(RawObject::kClassIdTagBit == 16); | 2604 ASSERT(RawObject::kClassIdTagPos == 16); |
| 2605 ASSERT(RawObject::kClassIdTagSize == 16); | 2605 ASSERT(RawObject::kClassIdTagSize == 16); |
| 2606 const intptr_t class_id_offset = Object::tags_offset() + | 2606 const intptr_t class_id_offset = Object::tags_offset() + |
| 2607 RawObject::kClassIdTagBit / kBitsPerByte; | 2607 RawObject::kClassIdTagPos / kBitsPerByte; |
| 2608 movzxw(result, FieldAddress(object, class_id_offset)); | 2608 movzxw(result, FieldAddress(object, class_id_offset)); |
| 2609 } | 2609 } |
| 2610 | 2610 |
| 2611 | 2611 |
| 2612 void Assembler::LoadClassById(Register result, Register class_id) { | 2612 void Assembler::LoadClassById(Register result, Register class_id) { |
| 2613 ASSERT(result != class_id); | 2613 ASSERT(result != class_id); |
| 2614 movl(result, FieldAddress(CTX, Context::isolate_offset())); | 2614 movl(result, FieldAddress(CTX, Context::isolate_offset())); |
| 2615 const intptr_t table_offset_in_isolate = | 2615 const intptr_t table_offset_in_isolate = |
| 2616 Isolate::class_table_offset() + ClassTable::table_offset(); | 2616 Isolate::class_table_offset() + ClassTable::table_offset(); |
| 2617 movl(result, Address(result, table_offset_in_isolate)); | 2617 movl(result, Address(result, table_offset_in_isolate)); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2659 | 2659 |
| 2660 const char* Assembler::FpuRegisterName(FpuRegister reg) { | 2660 const char* Assembler::FpuRegisterName(FpuRegister reg) { |
| 2661 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); | 2661 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); |
| 2662 return xmm_reg_names[reg]; | 2662 return xmm_reg_names[reg]; |
| 2663 } | 2663 } |
| 2664 | 2664 |
| 2665 | 2665 |
| 2666 } // namespace dart | 2666 } // namespace dart |
| 2667 | 2667 |
| 2668 #endif // defined TARGET_ARCH_IA32 | 2668 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |