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 2071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2082 | 2082 |
2083 | 2083 |
2084 void Assembler::Drop(intptr_t stack_elements) { | 2084 void Assembler::Drop(intptr_t stack_elements) { |
2085 ASSERT(stack_elements >= 0); | 2085 ASSERT(stack_elements >= 0); |
2086 if (stack_elements > 0) { | 2086 if (stack_elements > 0) { |
2087 addl(ESP, Immediate(stack_elements * kWordSize)); | 2087 addl(ESP, Immediate(stack_elements * kWordSize)); |
2088 } | 2088 } |
2089 } | 2089 } |
2090 | 2090 |
2091 | 2091 |
| 2092 void Assembler::LoadIsolate(Register dst) { |
| 2093 movl(dst, Immediate(reinterpret_cast<uword>(Isolate::Current()))); |
| 2094 } |
| 2095 |
| 2096 |
2092 void Assembler::LoadObject(Register dst, const Object& object) { | 2097 void Assembler::LoadObject(Register dst, const Object& object) { |
2093 if (object.IsSmi() || object.InVMHeap()) { | 2098 if (object.IsSmi() || object.InVMHeap()) { |
2094 movl(dst, Immediate(reinterpret_cast<int32_t>(object.raw()))); | 2099 movl(dst, Immediate(reinterpret_cast<int32_t>(object.raw()))); |
2095 } else { | 2100 } else { |
2096 ASSERT(object.IsNotTemporaryScopedHandle()); | 2101 ASSERT(object.IsNotTemporaryScopedHandle()); |
2097 ASSERT(object.IsOld()); | 2102 ASSERT(object.IsOld()); |
2098 AssemblerBuffer::EnsureCapacity ensured(&buffer_); | 2103 AssemblerBuffer::EnsureCapacity ensured(&buffer_); |
2099 EmitUint8(0xB8 + dst); | 2104 EmitUint8(0xB8 + dst); |
2100 buffer_.EmitObject(object); | 2105 buffer_.EmitObject(object); |
2101 } | 2106 } |
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2871 | 2876 |
2872 const char* Assembler::FpuRegisterName(FpuRegister reg) { | 2877 const char* Assembler::FpuRegisterName(FpuRegister reg) { |
2873 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); | 2878 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); |
2874 return xmm_reg_names[reg]; | 2879 return xmm_reg_names[reg]; |
2875 } | 2880 } |
2876 | 2881 |
2877 | 2882 |
2878 } // namespace dart | 2883 } // namespace dart |
2879 | 2884 |
2880 #endif // defined TARGET_ARCH_IA32 | 2885 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |