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

Side by Side Diff: include/llvm/MC/MCInst.h

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 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
« no previous file with comments | « include/llvm/MC/MCAsmBackend.h ('k') | include/llvm/MC/MCNaCl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===-- llvm/MC/MCInst.h - MCInst class -------------------------*- C++ -*-===// 1 //===-- llvm/MC/MCInst.h - MCInst class -------------------------*- C++ -*-===//
2 // 2 //
3 // The LLVM Compiler Infrastructure 3 // The LLVM Compiler Infrastructure
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 contains the declaration of the MCInst and MCOperand classes, which 10 // This file contains the declaration of the MCInst and MCOperand classes, which
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 union { 44 union {
45 unsigned RegVal; 45 unsigned RegVal;
46 int64_t ImmVal; 46 int64_t ImmVal;
47 double FPImmVal; 47 double FPImmVal;
48 const MCExpr *ExprVal; 48 const MCExpr *ExprVal;
49 const MCInst *InstVal; 49 const MCInst *InstVal;
50 }; 50 };
51 public: 51 public:
52 52
53 MCOperand() : Kind(kInvalid), FPImmVal(0.0) {} 53 // @LOCALMOD-START
54 // Initialize ImmVal instead of FPImmVal, thanks to
55 // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58416
56 MCOperand() : Kind(kInvalid), ImmVal(0) {}
57 // @LOCALMOD-END
54 58
55 bool isValid() const { return Kind != kInvalid; } 59 bool isValid() const { return Kind != kInvalid; }
56 bool isReg() const { return Kind == kRegister; } 60 bool isReg() const { return Kind == kRegister; }
57 bool isImm() const { return Kind == kImmediate; } 61 bool isImm() const { return Kind == kImmediate; }
58 bool isFPImm() const { return Kind == kFPImmediate; } 62 bool isFPImm() const { return Kind == kFPImmediate; }
59 bool isExpr() const { return Kind == kExpr; } 63 bool isExpr() const { return Kind == kExpr; }
60 bool isInst() const { return Kind == kInst; } 64 bool isInst() const { return Kind == kInst; }
61 65
62 /// getReg - Returns the register number. 66 /// getReg - Returns the register number.
63 unsigned getReg() const { 67 unsigned getReg() const {
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 } 202 }
199 203
200 inline raw_ostream& operator<<(raw_ostream &OS, const MCInst &MI) { 204 inline raw_ostream& operator<<(raw_ostream &OS, const MCInst &MI) {
201 MI.print(OS, nullptr); 205 MI.print(OS, nullptr);
202 return OS; 206 return OS;
203 } 207 }
204 208
205 } // end namespace llvm 209 } // end namespace llvm
206 210
207 #endif 211 #endif
OLDNEW
« no previous file with comments | « include/llvm/MC/MCAsmBackend.h ('k') | include/llvm/MC/MCNaCl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698