| OLD | NEW |
| 1 //===- subzero/src/assembler.h - Integrated assembler -----------*- C++ -*-===// | 1 //===- subzero/src/assembler.h - Integrated assembler -----------*- C++ -*-===// |
| 2 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 2 // Copyright (c) 2012, 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 |
| 11 // | 11 // |
| 12 // This file is distributed under the University of Illinois Open Source | 12 // This file is distributed under the University of Illinois Open Source |
| 13 // License. See LICENSE.TXT for details. | 13 // License. See LICENSE.TXT for details. |
| 14 // | 14 // |
| 15 //===----------------------------------------------------------------------===// | 15 //===----------------------------------------------------------------------===// |
| 16 // | 16 // |
| 17 // This file declares the Assembler base class. Instructions are assembled | 17 // This file declares the Assembler base class. Instructions are assembled |
| 18 // by architecture-specific assemblers that derive from this base class. | 18 // by architecture-specific assemblers that derive from this base class. |
| 19 // This base class manages buffers and fixups for emitting code, etc. | 19 // This base class manages buffers and fixups for emitting code, etc. |
| 20 // | 20 // |
| 21 //===----------------------------------------------------------------------===// | 21 //===----------------------------------------------------------------------===// |
| 22 | 22 |
| 23 #ifndef SUBZERO_SRC_ASSEMBLER_H | 23 #ifndef SUBZERO_SRC_ASSEMBLER_H |
| 24 #define SUBZERO_SRC_ASSEMBLER_H | 24 #define SUBZERO_SRC_ASSEMBLER_H |
| 25 | 25 |
| 26 #include "IceDefs.h" | 26 #include "IceDefs.h" |
| 27 | |
| 28 #include "IceFixups.h" | 27 #include "IceFixups.h" |
| 29 #include "llvm/Support/Allocator.h" | |
| 30 | 28 |
| 31 namespace Ice { | 29 namespace Ice { |
| 32 | 30 |
| 33 // Forward declarations. | 31 // Forward declarations. |
| 34 class Assembler; | 32 class Assembler; |
| 35 class AssemblerFixup; | 33 class AssemblerFixup; |
| 36 class AssemblerBuffer; | 34 class AssemblerBuffer; |
| 37 class ConstantRelocatable; | 35 class ConstantRelocatable; |
| 38 | 36 |
| 39 // Assembler fixups are positions in generated code that hold relocation | 37 // Assembler fixups are positions in generated code that hold relocation |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 // Mark the current text location as the start of a CFG node | 223 // Mark the current text location as the start of a CFG node |
| 226 // (represented by NodeNumber). | 224 // (represented by NodeNumber). |
| 227 virtual void BindCfgNodeLabel(SizeT NodeNumber) = 0; | 225 virtual void BindCfgNodeLabel(SizeT NodeNumber) = 0; |
| 228 | 226 |
| 229 // Return a view of all the bytes of code for the current function. | 227 // Return a view of all the bytes of code for the current function. |
| 230 llvm::StringRef getBufferView() const; | 228 llvm::StringRef getBufferView() const; |
| 231 | 229 |
| 232 void emitIASBytes(GlobalContext *Ctx) const; | 230 void emitIASBytes(GlobalContext *Ctx) const; |
| 233 | 231 |
| 234 private: | 232 private: |
| 235 llvm::BumpPtrAllocator Allocator; | 233 ArenaAllocator Allocator; |
| 236 | 234 |
| 237 protected: | 235 protected: |
| 238 AssemblerBuffer buffer_; | 236 AssemblerBuffer buffer_; |
| 239 }; | 237 }; |
| 240 | 238 |
| 241 } // end of namespace Ice | 239 } // end of namespace Ice |
| 242 | 240 |
| 243 #endif // SUBZERO_SRC_ASSEMBLER_H_ | 241 #endif // SUBZERO_SRC_ASSEMBLER_H_ |
| OLD | NEW |