[llvm-commits] [llvm] r170673 - in /llvm/trunk/lib/Target/Mips: Mips16RegisterInfo.cpp MipsInstrInfo.td
Reed Kotler
rkotler at mips.com
Wed Dec 19 22:57:00 PST 2012
Author: rkotler
Date: Thu Dec 20 00:57:00 2012
New Revision: 170673
URL: http://llvm.org/viewvc/llvm-project?rev=170673&view=rev
Log:
There is one more patch to finish large frames. Make sure we assert
on code that has large frames which will not yet compile correctly.
Modified:
llvm/trunk/lib/Target/Mips/Mips16RegisterInfo.cpp
llvm/trunk/lib/Target/Mips/MipsInstrInfo.td
Modified: llvm/trunk/lib/Target/Mips/Mips16RegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/Mips16RegisterInfo.cpp?rev=170673&r1=170672&r2=170673&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/Mips16RegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/Mips/Mips16RegisterInfo.cpp Thu Dec 20 00:57:00 2012
@@ -146,6 +146,10 @@
DEBUG(errs() << "Offset : " << Offset << "\n" << "<--------->\n");
+ if (!MI.isDebugValue() && ( ((FrameReg != Mips::SP) && !isInt<16>(Offset)) ||
+ ((FrameReg == Mips::SP) && !isInt<15>(Offset)) )) {
+ assert(false && "frame offset does not fit in instruction");
+ }
MI.getOperand(OpNo).ChangeToRegister(FrameReg, false);
MI.getOperand(OpNo + 1).ChangeToImmediate(Offset);
Modified: llvm/trunk/lib/Target/Mips/MipsInstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsInstrInfo.td?rev=170673&r1=170672&r2=170673&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsInstrInfo.td (original)
+++ llvm/trunk/lib/Target/Mips/MipsInstrInfo.td Thu Dec 20 00:57:00 2012
@@ -298,6 +298,10 @@
// e.g. addi, andi
def immSExt16 : PatLeaf<(imm), [{ return isInt<16>(N->getSExtValue()); }]>;
+// Node immediate fits as 15-bit sign extended on target immediate.
+// e.g. addi, andi
+def immSExt15 : PatLeaf<(imm), [{ return isInt<15>(N->getSExtValue()); }]>;
+
// Node immediate fits as 16-bit zero extended on target immediate.
// The LO16 param means that only the lower 16 bits of the node
// immediate are caught.
More information about the llvm-commits
mailing list