Changes in directory llvm/lib/Target/ARM:
ARMISelDAGToDAG.cpp updated: 1.54 -> 1.55 --- Log message: fix some bugs affecting functions with no arguments --- Diffs of the changes: (+4 -2) ARMISelDAGToDAG.cpp | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) Index: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp diff -u llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.54 llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.55 --- llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.54 Fri Oct 6 07:50:22 2006 +++ llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Fri Oct 6 12:26:30 2006 @@ -181,6 +181,8 @@ } unsigned getStackSize(void) { int last = is_reg.size() - 1; + if (last < 0) + return 0; if (isRegister(last)) return 0; return getOffset(last) + MVT::getSizeInBits(getType(last))/8; @@ -193,7 +195,7 @@ last--; return last; } - unsigned lastRegNum(void) { + int lastRegNum(void) { int l = lastRegArg(); if (l < 0) return -1; @@ -264,7 +266,7 @@ // Build a sequence of copy-to-reg nodes chained together with token chain // and flag operands which copy the outgoing args into the appropriate regs. SDOperand InFlag; - for (unsigned i = 0, e = Layout.lastRegArg(); i <= e; ++i) { + for (int i = 0, e = Layout.lastRegArg(); i <= e; ++i) { SDOperand Arg = Op.getOperand(5+2*i); unsigned RegNum = Layout.getRegisterNum(i); unsigned Reg1 = regs[RegNum]; _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits