llvm.org GIT mirror llvm / 5dd350d
Add a new method. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19249 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 15 years ago
1 changed file(s) with 10 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
4848 GlobalValue *GV;
4949
5050 X86AddressMode() : BaseType(RegBase), Scale(1), IndexReg(0), Disp(0),
51 GV(NULL) {}
51 GV(NULL) {
52 Base.Reg = 0;
53 }
5254 };
5355
5456 /// addDirectMem - This function is used to add a direct memory reference to the
7072 inline const MachineInstrBuilder &addRegOffset(const MachineInstrBuilder &MIB,
7173 unsigned Reg, int Offset) {
7274 return MIB.addReg(Reg).addZImm(1).addReg(0).addSImm(Offset);
75 }
76
77 /// addRegReg - This function is used to add a memory reference of the form:
78 /// [Reg + Reg].
79 inline const MachineInstrBuilder &addRegReg(const MachineInstrBuilder &MIB,
80 unsigned Reg1, unsigned Reg2) {
81 return MIB.addReg(Reg1).addZImm(1).addReg(Reg2).addSImm(0);
7382 }
7483
7584 inline const MachineInstrBuilder &addFullAddress(const MachineInstrBuilder &MIB,