abort();
}
} else if (isa<UndefValue>(C)) {
- BuildMI(*MBB, IP, V8::IMPLICIT_DEF, 0, R);
+ BuildMI(*MBB, IP, V8::IMPLICIT_DEF_Int, 0, R);
if (getClassB (C->getType ()) == cLong)
- BuildMI(*MBB, IP, V8::IMPLICIT_DEF, 0, R+1);
+ BuildMI(*MBB, IP, V8::IMPLICIT_DEF_Int, 0, R+1);
return;
}
case cShort:
case cInt:
case cFloat:
- BuildMI(BB, V8::IMPLICIT_DEF, 0, IncomingArgRegs[ArgNo]);
+ BuildMI(BB, V8::IMPLICIT_DEF_Int, 0, IncomingArgRegs[ArgNo]);
break;
case cDouble:
case cLong:
// Double and Long use register pairs.
- BuildMI(BB, V8::IMPLICIT_DEF, 0, IncomingArgRegs[ArgNo]);
+ BuildMI(BB, V8::IMPLICIT_DEF_Int, 0, IncomingArgRegs[ArgNo]);
++ArgNo;
if (ArgNo < 6)
- BuildMI(BB, V8::IMPLICIT_DEF, 0, IncomingArgRegs[ArgNo]);
+ BuildMI(BB, V8::IMPLICIT_DEF_Int, 0, IncomingArgRegs[ArgNo]);
break;
default:
assert (0 && "type not handled");
// FIXME: We could avoid storing any args onto the stack that don't
// need to be in memory, because they come before the ellipsis in the
// parameter list (and thus could never be accessed through va_arg).
- if (LF->getFunctionType ()->isVarArg ()) {
+ if (LF->getFunctionType()->isVarArg()) {
for (unsigned i = 0; i < 6; ++i) {
int FI = F->getFrameInfo()->CreateFixedObject(4, ArgOffset);
assert (IAR != IAREnd
"About to dereference past end of OutgoingArgRegs");
BuildMI (BB, V8::ORrr, 2, *OAR++).addReg (V8::G0).addReg (ArgReg);
} else {
- BuildMI (BB, V8::STri, 3).addReg (V8::SP).addSImm (ArgOffset)
+ BuildMI (BB, V8::STri, 3).addReg (V8::O6).addSImm (ArgOffset)
.addReg (ArgReg);
}
ArgOffset += 4;
"About to dereference past end of OutgoingArgRegs");
BuildMI (BB, V8::LDri, 2, *OAR++).addFrameIndex (FI).addSImm (0);
} else {
- BuildMI (BB, V8::STFri, 3).addReg (V8::SP).addSImm (ArgOffset)
+ BuildMI (BB, V8::STFri, 3).addReg (V8::O6).addSImm (ArgOffset)
.addReg (ArgReg);
}
ArgOffset += 4;
} else {
unsigned TempReg = makeAnotherReg (Type::IntTy);
BuildMI (BB, V8::LDri, 2, TempReg).addFrameIndex (FI).addSImm (0);
- BuildMI (BB, V8::STri, 3).addReg (V8::SP).addSImm (ArgOffset)
+ BuildMI (BB, V8::STri, 3).addReg (V8::O6).addSImm (ArgOffset)
.addReg (TempReg);
}
ArgOffset += 4;
} else {
unsigned TempReg = makeAnotherReg (Type::IntTy);
BuildMI (BB, V8::LDri, 2, TempReg).addFrameIndex (FI).addSImm (4);
- BuildMI (BB, V8::STri, 3).addReg (V8::SP).addSImm (ArgOffset)
+ BuildMI (BB, V8::STri, 3).addReg (V8::O6).addSImm (ArgOffset)
.addReg (TempReg);
}
ArgOffset += 4;
"About to dereference past end of OutgoingArgRegs");
BuildMI (BB, V8::ORrr, 2, *OAR++).addReg (V8::G0).addReg (ArgReg);
} else {
- BuildMI (BB, V8::STri, 3).addReg (V8::SP).addSImm (ArgOffset)
+ BuildMI (BB, V8::STri, 3).addReg (V8::O6).addSImm (ArgOffset)
.addReg (ArgReg);
}
ArgOffset += 4;
"About to dereference past end of OutgoingArgRegs");
BuildMI (BB, V8::ORrr, 2, *OAR++).addReg (V8::G0).addReg (ArgReg+1);
} else {
- BuildMI (BB, V8::STri, 3).addReg (V8::SP).addSImm (ArgOffset)
+ BuildMI (BB, V8::STri, 3).addReg (V8::O6).addSImm (ArgOffset)
.addReg (ArgReg+1);
}
ArgOffset += 4;
// CondReg=(<condition>);
// If (CondReg==0) goto notTakenSuccMBB;
unsigned CondReg = getReg (I.getCondition ());
- BuildMI (BB, V8::CMPri, 2).addSImm (0).addReg (CondReg);
+ BuildMI (BB, V8::SUBCCri, 2, V8::G0).addReg(CondReg).addSImm(0);
BuildMI (BB, V8::BE, 1).addMBB (notTakenSuccMBB);
BuildMI (BB, V8::BA, 1).addMBB (takenSuccMBB);
return;
unsigned Tmp = makeAnotherReg (I.getType ());
// Sign extend into the Y register
BuildMI (BB, V8::SRAri, 2, Tmp).addReg (Op0Reg).addZImm (31);
- BuildMI (BB, V8::WRrr, 2, V8::Y).addReg (Tmp).addReg (V8::G0);
+ BuildMI (BB, V8::WRYrr, 2).addReg (Tmp).addReg (V8::G0);
BuildMI (BB, V8::SDIVrr, 2, Dest).addReg (Op0Reg).addReg (Op1Reg);
} else {
// Zero extend into the Y register, ie, just set it to zero
- BuildMI (BB, V8::WRrr, 2, V8::Y).addReg (V8::G0).addReg (V8::G0);
+ BuildMI (BB, V8::WRYrr, 2).addReg (V8::G0).addReg (V8::G0);
BuildMI (BB, V8::UDIVrr, 2, Dest).addReg (Op0Reg).addReg (Op1Reg);
}
BuildMI (BB, V8::ANDri, 2, StackAdjReg).addReg (TmpReg2).addSImm (-8);
// Subtract size from stack pointer, thereby allocating some space.
- BuildMI (BB, V8::SUBrr, 2, V8::SP).addReg (V8::SP).addReg (StackAdjReg);
+ BuildMI (BB, V8::SUBrr, 2, V8::O6).addReg (V8::O6).addReg (StackAdjReg);
// Put a pointer to the space into the result register, by copying
// the stack pointer.
- BuildMI (BB, V8::ADDri, 2, getReg(I)).addReg (V8::SP).addSImm (96);
+ BuildMI (BB, V8::ADDri, 2, getReg(I)).addReg (V8::O6).addSImm (96);
// Inform the Frame Information that we have just allocated a variable-sized
// object.
// Add the VarArgsOffset to the frame pointer, and copy it to the result.
unsigned DestReg = getReg (CI.getOperand(1));
unsigned Tmp = makeAnotherReg(Type::IntTy);
- BuildMI (BB, V8::ADDri, 2, Tmp).addReg (V8::FP).addSImm (VarArgsOffset);
+ BuildMI (BB, V8::ADDri, 2, Tmp).addReg (V8::I6).addSImm (VarArgsOffset);
BuildMI(BB, V8::STri, 3).addReg(DestReg).addSImm(0).addReg(Tmp);
return;
}