| 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/heap.h" | 9 #include "vm/heap.h" |
| 10 #include "vm/memory_region.h" | 10 #include "vm/memory_region.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 reinterpret_cast<DetectCPUFeatures>(instructions.EntryPoint())(); | 58 reinterpret_cast<DetectCPUFeatures>(instructions.EntryPoint())(); |
| 59 sse4_1_supported_ = (features & kSSE4_1BitMask) != 0; | 59 sse4_1_supported_ = (features & kSSE4_1BitMask) != 0; |
| 60 #ifdef DEBUG | 60 #ifdef DEBUG |
| 61 initialized_ = true; | 61 initialized_ = true; |
| 62 #endif | 62 #endif |
| 63 } | 63 } |
| 64 | 64 |
| 65 #undef __ | 65 #undef __ |
| 66 | 66 |
| 67 | 67 |
| 68 Address Address::StackSlotAddress(const Location& stack_slot) { |
| 69 ASSERT(stack_slot.IsStackSlot() || stack_slot.IsDoubleStackSlot() || |
| 70 stack_slot.IsQuadStackSlot()); |
| 71 return Address(RBP, stack_slot.ToStackSlotOffset()); |
| 72 } |
| 73 |
| 74 |
| 68 void Assembler::InitializeMemoryWithBreakpoints(uword data, int length) { | 75 void Assembler::InitializeMemoryWithBreakpoints(uword data, int length) { |
| 69 memset(reinterpret_cast<void*>(data), Instr::kBreakPointInstruction, length); | 76 memset(reinterpret_cast<void*>(data), Instr::kBreakPointInstruction, length); |
| 70 } | 77 } |
| 71 | 78 |
| 72 | 79 |
| 73 void Assembler::call(Register reg) { | 80 void Assembler::call(Register reg) { |
| 74 AssemblerBuffer::EnsureCapacity ensured(&buffer_); | 81 AssemblerBuffer::EnsureCapacity ensured(&buffer_); |
| 75 Operand operand(reg); | 82 Operand operand(reg); |
| 76 EmitOperandREX(2, operand, REX_NONE); | 83 EmitOperandREX(2, operand, REX_NONE); |
| 77 EmitUint8(0xFF); | 84 EmitUint8(0xFF); |
| (...skipping 2467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2545 | 2552 |
| 2546 const char* Assembler::FpuRegisterName(FpuRegister reg) { | 2553 const char* Assembler::FpuRegisterName(FpuRegister reg) { |
| 2547 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); | 2554 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); |
| 2548 return xmm_reg_names[reg]; | 2555 return xmm_reg_names[reg]; |
| 2549 } | 2556 } |
| 2550 | 2557 |
| 2551 | 2558 |
| 2552 } // namespace dart | 2559 } // namespace dart |
| 2553 | 2560 |
| 2554 #endif // defined TARGET_ARCH_X64 | 2561 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |