Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/IceAssemblerX86BaseImpl.h

Issue 1651163002: Subzero. Enables moar complex relocation offsets. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Addresses comments. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 } 99 }
100 100
101 template <typename TraitsType> 101 template <typename TraitsType>
102 void AssemblerX86Base<TraitsType>::bindLocalLabel(SizeT Number) { 102 void AssemblerX86Base<TraitsType>::bindLocalLabel(SizeT Number) {
103 Label *L = getOrCreateLocalLabel(Number); 103 Label *L = getOrCreateLocalLabel(Number);
104 if (!getPreliminary()) 104 if (!getPreliminary())
105 this->bind(L); 105 this->bind(L);
106 } 106 }
107 107
108 template <typename TraitsType> 108 template <typename TraitsType>
109 void AssemblerX86Base<TraitsType>::bindRelocOffset(RelocOffset *Offset) {
110 if (!getPreliminary()) {
111 Offset->setOffset(Buffer.getPosition());
112 }
113 }
114
115 template <typename TraitsType>
109 void AssemblerX86Base<TraitsType>::call(GPRRegister reg) { 116 void AssemblerX86Base<TraitsType>::call(GPRRegister reg) {
110 AssemblerBuffer::EnsureCapacity ensured(&Buffer); 117 AssemblerBuffer::EnsureCapacity ensured(&Buffer);
111 emitRexB(RexTypeIrrelevant, reg); 118 emitRexB(RexTypeIrrelevant, reg);
112 emitUint8(0xFF); 119 emitUint8(0xFF);
113 emitRegisterOperand(2, gprEncoding(reg)); 120 emitRegisterOperand(2, gprEncoding(reg));
114 } 121 }
115 122
116 template <typename TraitsType> 123 template <typename TraitsType>
117 void AssemblerX86Base<TraitsType>::call(const Address &address) { 124 void AssemblerX86Base<TraitsType>::call(const Address &address) {
118 AssemblerBuffer::EnsureCapacity ensured(&Buffer); 125 AssemblerBuffer::EnsureCapacity ensured(&Buffer);
(...skipping 3401 matching lines...) Expand 10 before | Expand all | Expand 10 after
3520 (void)shifter; 3527 (void)shifter;
3521 if (Ty == IceType_i16) 3528 if (Ty == IceType_i16)
3522 emitOperandSizeOverride(); 3529 emitOperandSizeOverride();
3523 emitRexB(Ty, operand.rm()); 3530 emitRexB(Ty, operand.rm());
3524 emitUint8(isByteSizedArithType(Ty) ? 0xD2 : 0xD3); 3531 emitUint8(isByteSizedArithType(Ty) ? 0xD2 : 0xD3);
3525 emitOperand(rm, operand); 3532 emitOperand(rm, operand);
3526 } 3533 }
3527 3534
3528 } // end of namespace X86NAMESPACE 3535 } // end of namespace X86NAMESPACE
3529 } // end of namespace Ice 3536 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceAssemblerX86Base.h ('k') | src/IceDefs.h » ('j') | src/IceDefs.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698