mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-08 13:36:26 +00:00
Add a new method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19249 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
eb96ec52ff
commit
5dd350defd
@ -49,7 +49,9 @@ struct X86AddressMode {
|
||||
GlobalValue *GV;
|
||||
|
||||
X86AddressMode() : BaseType(RegBase), Scale(1), IndexReg(0), Disp(0),
|
||||
GV(NULL) {}
|
||||
GV(NULL) {
|
||||
Base.Reg = 0;
|
||||
}
|
||||
};
|
||||
|
||||
/// addDirectMem - This function is used to add a direct memory reference to the
|
||||
@ -73,6 +75,13 @@ inline const MachineInstrBuilder &addRegOffset(const MachineInstrBuilder &MIB,
|
||||
return MIB.addReg(Reg).addZImm(1).addReg(0).addSImm(Offset);
|
||||
}
|
||||
|
||||
/// addRegReg - This function is used to add a memory reference of the form:
|
||||
/// [Reg + Reg].
|
||||
inline const MachineInstrBuilder &addRegReg(const MachineInstrBuilder &MIB,
|
||||
unsigned Reg1, unsigned Reg2) {
|
||||
return MIB.addReg(Reg1).addZImm(1).addReg(Reg2).addSImm(0);
|
||||
}
|
||||
|
||||
inline const MachineInstrBuilder &addFullAddress(const MachineInstrBuilder &MIB,
|
||||
const X86AddressMode &AM) {
|
||||
assert (AM.Scale == 1 || AM.Scale == 2 || AM.Scale == 4 || AM.Scale == 8);
|
||||
|
Loading…
x
Reference in New Issue
Block a user