| 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 // Modified by the Subzero authors. | 5 // Modified by the Subzero authors. |
| 6 // | 6 // |
| 7 //===- subzero/src/assembler_ia32.cpp - Assembler for x86-32 -------------===// | 7 //===- subzero/src/assembler_ia32.cpp - Assembler for x86-32 -------------===// |
| 8 // | 8 // |
| 9 // The Subzero Code Generator | 9 // The Subzero Code Generator |
| 10 // | 10 // |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 EmitInt32(-4); | 92 EmitInt32(-4); |
| 93 assert((buffer_.GetPosition() - call_start) == kCallExternalLabelSize); | 93 assert((buffer_.GetPosition() - call_start) == kCallExternalLabelSize); |
| 94 (void)call_start; | 94 (void)call_start; |
| 95 } | 95 } |
| 96 | 96 |
| 97 void AssemblerX86::pushl(GPRRegister reg) { | 97 void AssemblerX86::pushl(GPRRegister reg) { |
| 98 AssemblerBuffer::EnsureCapacity ensured(&buffer_); | 98 AssemblerBuffer::EnsureCapacity ensured(&buffer_); |
| 99 EmitUint8(0x50 + reg); | 99 EmitUint8(0x50 + reg); |
| 100 } | 100 } |
| 101 | 101 |
| 102 void AssemblerX86::pushl(const Address &address) { | |
| 103 AssemblerBuffer::EnsureCapacity ensured(&buffer_); | |
| 104 EmitUint8(0xFF); | |
| 105 EmitOperand(6, address); | |
| 106 } | |
| 107 | |
| 108 void AssemblerX86::pushl(const Immediate &imm) { | |
| 109 AssemblerBuffer::EnsureCapacity ensured(&buffer_); | |
| 110 EmitUint8(0x68); | |
| 111 EmitImmediate(BrokenType, imm); | |
| 112 } | |
| 113 | |
| 114 void AssemblerX86::popl(GPRRegister reg) { | 102 void AssemblerX86::popl(GPRRegister reg) { |
| 115 AssemblerBuffer::EnsureCapacity ensured(&buffer_); | 103 AssemblerBuffer::EnsureCapacity ensured(&buffer_); |
| 116 EmitUint8(0x58 + reg); | 104 EmitUint8(0x58 + reg); |
| 117 } | 105 } |
| 118 | 106 |
| 119 void AssemblerX86::popl(const Address &address) { | 107 void AssemblerX86::popl(const Address &address) { |
| 120 AssemblerBuffer::EnsureCapacity ensured(&buffer_); | 108 AssemblerBuffer::EnsureCapacity ensured(&buffer_); |
| 121 EmitUint8(0x8F); | 109 EmitUint8(0x8F); |
| 122 EmitOperand(0, address); | 110 EmitOperand(0, address); |
| 123 } | 111 } |
| (...skipping 2153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2277 assert(shifter == RegX8632::Encoded_Reg_ecx); | 2265 assert(shifter == RegX8632::Encoded_Reg_ecx); |
| 2278 (void)shifter; | 2266 (void)shifter; |
| 2279 if (Ty == IceType_i16) | 2267 if (Ty == IceType_i16) |
| 2280 EmitOperandSizeOverride(); | 2268 EmitOperandSizeOverride(); |
| 2281 EmitUint8(isByteSizedArithType(Ty) ? 0xD2 : 0xD3); | 2269 EmitUint8(isByteSizedArithType(Ty) ? 0xD2 : 0xD3); |
| 2282 EmitOperand(rm, operand); | 2270 EmitOperand(rm, operand); |
| 2283 } | 2271 } |
| 2284 | 2272 |
| 2285 } // end of namespace x86 | 2273 } // end of namespace x86 |
| 2286 } // end of namespace Ice | 2274 } // end of namespace Ice |
| OLD | NEW |