}
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;
last--;
return last;
}
- unsigned lastRegNum(void) {
+ int lastRegNum(void) {
int l = lastRegArg();
if (l < 0)
return -1;
// 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];
void %f() {
entry:
call void %g( int 1, int 2, int 3, int 4 )
+ call void %h()
ret void
}
declare void %g(int, int, int, int)
+declare void %h()