| 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" // NOLINT | 5 #include "vm/globals.h" // NOLINT |
| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 | 89 |
| 90 void Assembler::pushl(const Address& address) { | 90 void Assembler::pushl(const Address& address) { |
| 91 AssemblerBuffer::EnsureCapacity ensured(&buffer_); | 91 AssemblerBuffer::EnsureCapacity ensured(&buffer_); |
| 92 EmitUint8(0xFF); | 92 EmitUint8(0xFF); |
| 93 EmitOperand(6, address); | 93 EmitOperand(6, address); |
| 94 } | 94 } |
| 95 | 95 |
| 96 | 96 |
| 97 void Assembler::pushl(const Immediate& imm) { | 97 void Assembler::pushl(const Immediate& imm) { |
| 98 AssemblerBuffer::EnsureCapacity ensured(&buffer_); | 98 AssemblerBuffer::EnsureCapacity ensured(&buffer_); |
| 99 EmitUint8(0x68); | 99 if (imm.is_int8()) { |
| 100 EmitImmediate(imm); | 100 EmitUint8(0x6A); |
| 101 EmitUint8(imm.value() & 0xFF); |
| 102 } else { |
| 103 EmitUint8(0x68); |
| 104 EmitImmediate(imm); |
| 105 } |
| 101 } | 106 } |
| 102 | 107 |
| 103 | 108 |
| 104 void Assembler::popl(Register reg) { | 109 void Assembler::popl(Register reg) { |
| 105 AssemblerBuffer::EnsureCapacity ensured(&buffer_); | 110 AssemblerBuffer::EnsureCapacity ensured(&buffer_); |
| 106 EmitUint8(0x58 + reg); | 111 EmitUint8(0x58 + reg); |
| 107 } | 112 } |
| 108 | 113 |
| 109 | 114 |
| 110 void Assembler::popl(const Address& address) { | 115 void Assembler::popl(const Address& address) { |
| (...skipping 3095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3206 | 3211 |
| 3207 const char* Assembler::FpuRegisterName(FpuRegister reg) { | 3212 const char* Assembler::FpuRegisterName(FpuRegister reg) { |
| 3208 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); | 3213 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); |
| 3209 return xmm_reg_names[reg]; | 3214 return xmm_reg_names[reg]; |
| 3210 } | 3215 } |
| 3211 | 3216 |
| 3212 | 3217 |
| 3213 } // namespace dart | 3218 } // namespace dart |
| 3214 | 3219 |
| 3215 #endif // defined TARGET_ARCH_IA32 | 3220 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |