From faf0b8c401c31419a11cd8bbc640340f2c6d52da Mon Sep 17 00:00:00 2001 From: Misha Brukman Date: Fri, 22 Nov 2002 22:42:12 +0000 Subject: [PATCH] Add a simple way to add memory locations of format [reg+offset] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4825 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86InstrBuilder.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/Target/X86/X86InstrBuilder.h b/lib/Target/X86/X86InstrBuilder.h index 1d9d6b9e1a7..2558a96c04e 100644 --- a/lib/Target/X86/X86InstrBuilder.h +++ b/lib/Target/X86/X86InstrBuilder.h @@ -25,4 +25,13 @@ inline const MachineInstrBuilder &addDirectMem(const MachineInstrBuilder &MIB, return MIB.addReg(Reg).addZImm(1).addMReg(0).addSImm(0); } + +/// addRegOffset - +/// +/// +inline const MachineInstrBuilder &addRegOffset(const MachineInstrBuilder &MIB, + unsigned Reg, unsigned Offset) { + return MIB.addReg(Reg).addZImm(1).addMReg(0).addSImm(Offset); +} + #endif