mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-19 04:29:21 +00:00
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:
parent
281a601198
commit
a13d3236d1
@ -1213,7 +1213,12 @@ unsigned ISel::SelectExpr(SDOperand N) {
|
|||||||
Tmp2 = SelectExpr(N.getOperand(1));
|
Tmp2 = SelectExpr(N.getOperand(1));
|
||||||
switch (N.getValueType()) {
|
switch (N.getValueType()) {
|
||||||
default: assert(0 && "Cannot add this type!");
|
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::i16: Opc = X86::IMUL16rr; break;
|
||||||
case MVT::i32: Opc = X86::IMUL32rr; break;
|
case MVT::i32: Opc = X86::IMUL32rr; break;
|
||||||
case MVT::f32:
|
case MVT::f32:
|
||||||
|
Loading…
Reference in New Issue
Block a user