mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-19 04:32:19 +00:00
Don't special case XS, XD prefixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26183 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
576c141921
commit
ee50a1ae27
@ -362,30 +362,25 @@ void Emitter::emitInstruction(const MachineInstr &MI) {
|
||||
// Emit the operand size opcode prefix as needed.
|
||||
if (Desc.TSFlags & X86II::OpSize) MCE.emitByte(0x66);
|
||||
|
||||
// Emit the double precision sse fp opcode prefix as needed.
|
||||
if ((Desc.TSFlags & X86II::Op0Mask) == X86II::XD) {
|
||||
MCE.emitByte(0xF2); MCE.emitByte(0x0F);
|
||||
}
|
||||
|
||||
// Emit the double precision sse fp opcode prefix as needed.
|
||||
if ((Desc.TSFlags & X86II::Op0Mask) == X86II::XS) {
|
||||
MCE.emitByte(0xF3); MCE.emitByte(0x0F);
|
||||
}
|
||||
|
||||
switch (Desc.TSFlags & X86II::Op0Mask) {
|
||||
case X86II::TB:
|
||||
MCE.emitByte(0x0F); // Two-byte opcode prefix
|
||||
break;
|
||||
case X86II::REP: break; // already handled.
|
||||
case X86II::XS: // F3 0F
|
||||
MCE.emitByte(0xF3);
|
||||
MCE.emitByte(0x0F);
|
||||
break;
|
||||
case X86II::XD: // F2 0F
|
||||
MCE.emitByte(0xF2);
|
||||
MCE.emitByte(0x0F);
|
||||
break;
|
||||
case X86II::D8: case X86II::D9: case X86II::DA: case X86II::DB:
|
||||
case X86II::DC: case X86II::DD: case X86II::DE: case X86II::DF:
|
||||
MCE.emitByte(0xD8+
|
||||
(((Desc.TSFlags & X86II::Op0Mask)-X86II::D8)
|
||||
>> X86II::Op0Shift));
|
||||
break; // Two-byte opcode prefix
|
||||
case X86II::REP:
|
||||
case X86II::XS:
|
||||
case X86II::XD:
|
||||
break; // already handled.
|
||||
default: assert(0 && "Invalid prefix!");
|
||||
case 0: break; // No prefix!
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user