mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 16:33:28 +00:00
add signed versions of the extra precision multiplies
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21106 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8f52980f03
commit
1e6a71524e
@ -339,6 +339,19 @@ def MUL16m : I<0xF7, MRM4m, (ops i16mem:$src),
|
||||
def MUL32m : I<0xF7, MRM4m, (ops i32mem:$src),
|
||||
"mul{l} $src">, Imp<[EAX],[EAX,EDX]>; // EAX,EDX = EAX*[mem32]
|
||||
|
||||
def IMUL8r : I<0xF6, MRM5r, (ops R8:$src), "imul{b} $src">,
|
||||
Imp<[AL],[AX]>; // AL,AH = AL*R8
|
||||
def IMUL16r : I<0xF7, MRM5r, (ops R16:$src), "imul{w} $src">,
|
||||
Imp<[AX],[AX,DX]>, OpSize; // AX,DX = AX*R16
|
||||
def IMUL32r : I<0xF7, MRM5r, (ops R32:$src), "imul{l} $src">,
|
||||
Imp<[EAX],[EAX,EDX]>; // EAX,EDX = EAX*R32
|
||||
def IMUL8m : I<0xF6, MRM5m, (ops i8mem :$src),
|
||||
"imul{b} $src">, Imp<[AL],[AX]>; // AL,AH = AL*[mem8]
|
||||
def IMUL16m : I<0xF7, MRM5m, (ops i16mem:$src),
|
||||
"imul{w} $src">, Imp<[AX],[AX,DX]>, OpSize;// AX,DX = AX*[mem16]
|
||||
def IMUL32m : I<0xF7, MRM5m, (ops i32mem:$src),
|
||||
"imul{l} $src">, Imp<[EAX],[EAX,EDX]>; // EAX,EDX = EAX*[mem32]
|
||||
|
||||
// unsigned division/remainder
|
||||
def DIV8r : I<0xF6, MRM6r, (ops R8:$src), // AX/r8 = AL,AH
|
||||
"div{b} $src">, Imp<[AX],[AX]>;
|
||||
|
@ -149,6 +149,9 @@ MachineInstr* X86RegisterInfo::foldMemoryOperand(MachineInstr* MI,
|
||||
case X86::MUL8r: return MakeMInst( X86::MUL8m , FrameIndex, MI);
|
||||
case X86::MUL16r: return MakeMInst( X86::MUL16m, FrameIndex, MI);
|
||||
case X86::MUL32r: return MakeMInst( X86::MUL32m, FrameIndex, MI);
|
||||
case X86::IMUL8r: return MakeMInst( X86::IMUL8m , FrameIndex, MI);
|
||||
case X86::IMUL16r: return MakeMInst( X86::IMUL16m, FrameIndex, MI);
|
||||
case X86::IMUL32r: return MakeMInst( X86::IMUL32m, FrameIndex, MI);
|
||||
case X86::DIV8r: return MakeMInst( X86::DIV8m , FrameIndex, MI);
|
||||
case X86::DIV16r: return MakeMInst( X86::DIV16m, FrameIndex, MI);
|
||||
case X86::DIV32r: return MakeMInst( X86::DIV32m, FrameIndex, MI);
|
||||
|
Loading…
x
Reference in New Issue
Block a user