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/heap.h" | 10 #include "vm/heap.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 73 |
74 | 74 |
75 class DirectCallRelocation : public AssemblerFixup { | 75 class DirectCallRelocation : public AssemblerFixup { |
76 public: | 76 public: |
77 void Process(const MemoryRegion& region, intptr_t position) { | 77 void Process(const MemoryRegion& region, intptr_t position) { |
78 // Direct calls are relative to the following instruction on x86. | 78 // Direct calls are relative to the following instruction on x86. |
79 int32_t pointer = region.Load<int32_t>(position); | 79 int32_t pointer = region.Load<int32_t>(position); |
80 int32_t delta = region.start() + position + sizeof(int32_t); | 80 int32_t delta = region.start() + position + sizeof(int32_t); |
81 region.Store<int32_t>(position, pointer - delta); | 81 region.Store<int32_t>(position, pointer - delta); |
82 } | 82 } |
| 83 |
| 84 virtual bool IsPointerOffset() const { return false; } |
83 }; | 85 }; |
84 | 86 |
85 | 87 |
86 int32_t Assembler::jit_cookie() { | 88 int32_t Assembler::jit_cookie() { |
87 if (jit_cookie_ == 0) { | 89 if (jit_cookie_ == 0) { |
88 jit_cookie_ = static_cast<int32_t>( | 90 jit_cookie_ = static_cast<int32_t>( |
89 Isolate::Current()->random()->NextUInt32()); | 91 Isolate::Current()->random()->NextUInt32()); |
90 } | 92 } |
91 return jit_cookie_; | 93 return jit_cookie_; |
92 } | 94 } |
(...skipping 2430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2523 | 2525 |
2524 const char* Assembler::FpuRegisterName(FpuRegister reg) { | 2526 const char* Assembler::FpuRegisterName(FpuRegister reg) { |
2525 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); | 2527 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); |
2526 return xmm_reg_names[reg]; | 2528 return xmm_reg_names[reg]; |
2527 } | 2529 } |
2528 | 2530 |
2529 | 2531 |
2530 } // namespace dart | 2532 } // namespace dart |
2531 | 2533 |
2532 #endif // defined TARGET_ARCH_IA32 | 2534 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |