From: Alkis Evlogimenos Date: Thu, 4 Mar 2004 18:05:02 +0000 (+0000) Subject: Add assertion for scale verification. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ce1e500e2f2e25da5164302af25573d828c4a11d;p=oota-llvm.git Add assertion for scale verification. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12120 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86InstrBuilder.h b/lib/Target/X86/X86InstrBuilder.h index a981db069eb..6612cd3e674 100644 --- a/lib/Target/X86/X86InstrBuilder.h +++ b/lib/Target/X86/X86InstrBuilder.h @@ -54,6 +54,7 @@ inline const MachineInstrBuilder &addFullAddress(const MachineInstrBuilder &MIB, unsigned Scale, unsigned IndexReg, unsigned Disp) { + assert (Scale == 1 || Scale == 2 || Scale == 4 || Scale == 8); return MIB.addReg(BaseReg).addZImm(Scale).addReg(IndexReg).addSImm(Disp); }