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

Side by Side Diff: src/IceFixups.h

Issue 1017373002: Subzero: Assemble calls to constant addresses. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: move test back Created 5 years, 9 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
« no previous file with comments | « src/IceELFSection.cpp ('k') | src/IceFixups.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceFixups.h - Assembler fixup kinds ----------*- C++ -*-===// 1 //===- subzero/src/IceFixups.h - Assembler fixup kinds ----------*- C++ -*-===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 // 9 //
10 // This file declares generic fixup types. 10 // This file declares generic fixup types.
(...skipping 20 matching lines...) Expand all
31 AssemblerFixup() : position_(0), kind_(0), value_(nullptr) {} 31 AssemblerFixup() : position_(0), kind_(0), value_(nullptr) {}
32 AssemblerFixup(const AssemblerFixup &) = default; 32 AssemblerFixup(const AssemblerFixup &) = default;
33 intptr_t position() const { return position_; } 33 intptr_t position() const { return position_; }
34 void set_position(intptr_t Position) { position_ = Position; } 34 void set_position(intptr_t Position) { position_ = Position; }
35 35
36 FixupKind kind() const { return kind_; } 36 FixupKind kind() const { return kind_; }
37 void set_kind(FixupKind Kind) { kind_ = Kind; } 37 void set_kind(FixupKind Kind) { kind_ = Kind; }
38 38
39 RelocOffsetT offset() const; 39 RelocOffsetT offset() const;
40 IceString symbol(const GlobalContext *Ctx) const; 40 IceString symbol(const GlobalContext *Ctx) const;
41
42 static const Constant *NullSymbol;
43 bool isNullSymbol() const { return value_ == NullSymbol; }
44
41 void set_value(const Constant *Value) { value_ = Value; } 45 void set_value(const Constant *Value) { value_ = Value; }
42 46
43 void emit(GlobalContext *Ctx) const; 47 void emit(GlobalContext *Ctx) const;
44 48
45 private: 49 private:
46 intptr_t position_; 50 intptr_t position_;
47 FixupKind kind_; 51 FixupKind kind_;
48 const Constant *value_; 52 const Constant *value_;
49 }; 53 };
50 54
51 typedef std::vector<AssemblerFixup> FixupList; 55 typedef std::vector<AssemblerFixup> FixupList;
52 typedef std::vector<AssemblerFixup *> FixupRefList; 56 typedef std::vector<AssemblerFixup *> FixupRefList;
53 57
54 } // end of namespace Ice 58 } // end of namespace Ice
55 59
56 #endif // SUBZERO_SRC_ICEFIXUPS_H 60 #endif // SUBZERO_SRC_ICEFIXUPS_H
OLDNEW
« no previous file with comments | « src/IceELFSection.cpp ('k') | src/IceFixups.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698