Implement 8-bit multiply for X86.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19435 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2005-01-10 20:55:48 +00:00
parent 281a601198
commit a13d3236d1

View File

@ -1213,7 +1213,12 @@ unsigned ISel::SelectExpr(SDOperand N) {
Tmp2 = SelectExpr(N.getOperand(1));
switch (N.getValueType()) {
default: assert(0 && "Cannot add this type!");
case MVT::i8: assert(0 && "FIXME: MUL i8 not implemented yet!");
case MVT::i8:
// Must use the MUL instruction, which forces use of AL.
BuildMI(BB, X86::MOV8rr, 1, X86::AL).addReg(Tmp1);
BuildMI(BB, X86::MUL8r, 1).addReg(Tmp2);
BuildMI(BB, X86::MOV8rr, 1, Result).addReg(X86::AL);
return Result;
case MVT::i16: Opc = X86::IMUL16rr; break;
case MVT::i32: Opc = X86::IMUL32rr; break;
case MVT::f32: