comparison include/llvm/MC/MCInstBuilder.h @ 95:afa8332a0e37

LLVM 3.8
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Tue, 13 Oct 2015 17:48:58 +0900
parents 95c75e76d11b
children
comparison
equal deleted inserted replaced
84:f3e34b893a5f 95:afa8332a0e37
28 Inst.setOpcode(Opcode); 28 Inst.setOpcode(Opcode);
29 } 29 }
30 30
31 /// \brief Add a new register operand. 31 /// \brief Add a new register operand.
32 MCInstBuilder &addReg(unsigned Reg) { 32 MCInstBuilder &addReg(unsigned Reg) {
33 Inst.addOperand(MCOperand::CreateReg(Reg)); 33 Inst.addOperand(MCOperand::createReg(Reg));
34 return *this; 34 return *this;
35 } 35 }
36 36
37 /// \brief Add a new integer immediate operand. 37 /// \brief Add a new integer immediate operand.
38 MCInstBuilder &addImm(int64_t Val) { 38 MCInstBuilder &addImm(int64_t Val) {
39 Inst.addOperand(MCOperand::CreateImm(Val)); 39 Inst.addOperand(MCOperand::createImm(Val));
40 return *this; 40 return *this;
41 } 41 }
42 42
43 /// \brief Add a new floating point immediate operand. 43 /// \brief Add a new floating point immediate operand.
44 MCInstBuilder &addFPImm(double Val) { 44 MCInstBuilder &addFPImm(double Val) {
45 Inst.addOperand(MCOperand::CreateFPImm(Val)); 45 Inst.addOperand(MCOperand::createFPImm(Val));
46 return *this; 46 return *this;
47 } 47 }
48 48
49 /// \brief Add a new MCExpr operand. 49 /// \brief Add a new MCExpr operand.
50 MCInstBuilder &addExpr(const MCExpr *Val) { 50 MCInstBuilder &addExpr(const MCExpr *Val) {
51 Inst.addOperand(MCOperand::CreateExpr(Val)); 51 Inst.addOperand(MCOperand::createExpr(Val));
52 return *this; 52 return *this;
53 } 53 }
54 54
55 /// \brief Add a new MCInst operand. 55 /// \brief Add a new MCInst operand.
56 MCInstBuilder &addInst(const MCInst *Val) { 56 MCInstBuilder &addInst(const MCInst *Val) {
57 Inst.addOperand(MCOperand::CreateInst(Val)); 57 Inst.addOperand(MCOperand::createInst(Val));
58 return *this;
59 }
60
61 /// \brief Add an operand.
62 MCInstBuilder &addOperand(const MCOperand &Op) {
63 Inst.addOperand(Op);
58 return *this; 64 return *this;
59 } 65 }
60 66
61 operator MCInst&() { 67 operator MCInst&() {
62 return Inst; 68 return Inst;