| OLD | NEW | 
|     1 //===- subzero/src/IceAssemblerX86BaseImpl.h - base x86 assembler -*- C++ -*-=// |     1 //===- subzero/src/IceAssemblerX86BaseImpl.h - base x86 assembler -*- C++ -*-=// | 
|     2 // Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file |     2 // Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file | 
|     3 // for details. All rights reserved. Use of this source code is governed by a |     3 // for details. All rights reserved. Use of this source code is governed by a | 
|     4 // BSD-style license that can be found in the LICENSE file. |     4 // BSD-style license that can be found in the LICENSE file. | 
|     5 // |     5 // | 
|     6 // Modified by the Subzero authors. |     6 // Modified by the Subzero authors. | 
|     7 // |     7 // | 
|     8 //===----------------------------------------------------------------------===// |     8 //===----------------------------------------------------------------------===// | 
|     9 // |     9 // | 
|    10 //                        The Subzero Code Generator |    10 //                        The Subzero Code Generator | 
| (...skipping 3159 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  3170 } |  3170 } | 
|  3171  |  3171  | 
|  3172 template <typename TraitsType> |  3172 template <typename TraitsType> | 
|  3173 void AssemblerX86Base<TraitsType>::jmp(const ConstantRelocatable *label) { |  3173 void AssemblerX86Base<TraitsType>::jmp(const ConstantRelocatable *label) { | 
|  3174   AssemblerBuffer::EnsureCapacity ensured(&Buffer); |  3174   AssemblerBuffer::EnsureCapacity ensured(&Buffer); | 
|  3175   emitUint8(0xE9); |  3175   emitUint8(0xE9); | 
|  3176   emitFixup(this->createFixup(Traits::FK_PcRel, label)); |  3176   emitFixup(this->createFixup(Traits::FK_PcRel, label)); | 
|  3177   emitInt32(-4); |  3177   emitInt32(-4); | 
|  3178 } |  3178 } | 
|  3179  |  3179  | 
 |  3180 template <typename TraitsType> | 
 |  3181 void AssemblerX86Base<TraitsType>::jmp(const Immediate &abs_address) { | 
 |  3182   AssemblerBuffer::EnsureCapacity ensured(&Buffer); | 
 |  3183   emitUint8(0xE9); | 
 |  3184   AssemblerFixup *Fixup = | 
 |  3185       this->createFixup(Traits::FK_PcRel, AssemblerFixup::NullSymbol); | 
 |  3186   Fixup->set_addend(abs_address.value()); | 
 |  3187   emitFixup(Fixup); | 
 |  3188   emitInt32(abs_address.value() - 4); | 
 |  3189 } | 
 |  3190  | 
|  3180 template <typename TraitsType> void AssemblerX86Base<TraitsType>::mfence() { |  3191 template <typename TraitsType> void AssemblerX86Base<TraitsType>::mfence() { | 
|  3181   AssemblerBuffer::EnsureCapacity ensured(&Buffer); |  3192   AssemblerBuffer::EnsureCapacity ensured(&Buffer); | 
|  3182   emitUint8(0x0F); |  3193   emitUint8(0x0F); | 
|  3183   emitUint8(0xAE); |  3194   emitUint8(0xAE); | 
|  3184   emitUint8(0xF0); |  3195   emitUint8(0xF0); | 
|  3185 } |  3196 } | 
|  3186  |  3197  | 
|  3187 template <typename TraitsType> void AssemblerX86Base<TraitsType>::lock() { |  3198 template <typename TraitsType> void AssemblerX86Base<TraitsType>::lock() { | 
|  3188   AssemblerBuffer::EnsureCapacity ensured(&Buffer); |  3199   AssemblerBuffer::EnsureCapacity ensured(&Buffer); | 
|  3189   emitUint8(0xF0); |  3200   emitUint8(0xF0); | 
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  3509   (void)shifter; |  3520   (void)shifter; | 
|  3510   if (Ty == IceType_i16) |  3521   if (Ty == IceType_i16) | 
|  3511     emitOperandSizeOverride(); |  3522     emitOperandSizeOverride(); | 
|  3512   emitRexB(Ty, operand.rm()); |  3523   emitRexB(Ty, operand.rm()); | 
|  3513   emitUint8(isByteSizedArithType(Ty) ? 0xD2 : 0xD3); |  3524   emitUint8(isByteSizedArithType(Ty) ? 0xD2 : 0xD3); | 
|  3514   emitOperand(rm, operand); |  3525   emitOperand(rm, operand); | 
|  3515 } |  3526 } | 
|  3516  |  3527  | 
|  3517 } // end of namespace X86NAMESPACE |  3528 } // end of namespace X86NAMESPACE | 
|  3518 } // end of namespace Ice |  3529 } // end of namespace Ice | 
| OLD | NEW |