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

Side by Side Diff: src/IceAssembler.h

Issue 1417173003: Fix ARM integrated assembler to be able to compile spec2k examples. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « no previous file | src/IceAssembler.cpp » ('j') | src/IceFixups.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceAssembler.h - Integrated assembler --------*- C++ -*-===// 1 //===- subzero/src/IceAssembler.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
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 virtual const char *getAlignDirective() const = 0; 277 virtual const char *getAlignDirective() const = 0;
278 virtual llvm::ArrayRef<uint8_t> getNonExecBundlePadding() const = 0; 278 virtual llvm::ArrayRef<uint8_t> getNonExecBundlePadding() const = 0;
279 279
280 /// Get the label for a CfgNode. 280 /// Get the label for a CfgNode.
281 virtual Label *getCfgNodeLabel(SizeT NodeNumber) = 0; 281 virtual Label *getCfgNodeLabel(SizeT NodeNumber) = 0;
282 /// Mark the current text location as the start of a CFG node. 282 /// Mark the current text location as the start of a CFG node.
283 virtual void bindCfgNodeLabel(const CfgNode *Node) = 0; 283 virtual void bindCfgNodeLabel(const CfgNode *Node) = 0;
284 284
285 virtual bool fixupIsPCRel(FixupKind Kind) const = 0; 285 virtual bool fixupIsPCRel(FixupKind Kind) const = 0;
286 286
287 // Return a view of all the bytes of code for the current function. 287 /// Return a view of all the bytes of code for the current function.
288 llvm::StringRef getBufferView() const; 288 llvm::StringRef getBufferView() const;
289 289
290 /// Returns the value of the given type in the corresponding buffer.
Jim Stichnoth 2015/10/27 21:41:21 I would say "Return" instead of "Returns" for agre
Karl 2015/10/27 22:16:41 Done.
291 template <typename T> T load(intptr_t Position) const {
292 return Buffer.load<T>(Position);
293 }
294
290 /// Emit a fixup at the current location. 295 /// Emit a fixup at the current location.
291 void emitFixup(AssemblerFixup *Fixup) { Buffer.emitFixup(Fixup); } 296 void emitFixup(AssemblerFixup *Fixup) { Buffer.emitFixup(Fixup); }
292 297
293 const FixupRefList &fixups() const { return Buffer.fixups(); } 298 const FixupRefList &fixups() const { return Buffer.fixups(); }
294 299
295 AssemblerFixup *createFixup(FixupKind Kind, const Constant *Value) { 300 AssemblerFixup *createFixup(FixupKind Kind, const Constant *Value) {
296 return Buffer.createFixup(Kind, Value); 301 return Buffer.createFixup(Kind, Value);
297 } 302 }
298 303
299 AssemblerTextFixup *createTextFixup(const std::string &Text, 304 AssemblerTextFixup *createTextFixup(const std::string &Text,
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 GlobalContext *Ctx; 349 GlobalContext *Ctx;
345 // Buffer's constructor uses the Allocator, so it needs to appear after it. 350 // Buffer's constructor uses the Allocator, so it needs to appear after it.
346 // TODO(jpp): dependencies on construction order are a nice way of shooting 351 // TODO(jpp): dependencies on construction order are a nice way of shooting
347 // yourself in the foot. Fix this. 352 // yourself in the foot. Fix this.
348 AssemblerBuffer Buffer; 353 AssemblerBuffer Buffer;
349 }; 354 };
350 355
351 } // end of namespace Ice 356 } // end of namespace Ice
352 357
353 #endif // SUBZERO_SRC_ICEASSEMBLER_H_ 358 #endif // SUBZERO_SRC_ICEASSEMBLER_H_
OLDNEW
« no previous file with comments | « no previous file | src/IceAssembler.cpp » ('j') | src/IceFixups.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698