mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-20 11:08:27 +00:00
Work around some x86 Darwin assembler bugs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25638 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f0b415f178
commit
67caa39e4c
@ -220,6 +220,32 @@ void X86ATTAsmPrinter::printMemReference(const MachineInstr *MI, unsigned Op){
|
||||
///
|
||||
void X86ATTAsmPrinter::printMachineInstruction(const MachineInstr *MI) {
|
||||
++EmittedInsts;
|
||||
// This works around some Darwin assembler bugs.
|
||||
if (forDarwin) {
|
||||
switch (MI->getOpcode()) {
|
||||
case X86::REP_MOVSB:
|
||||
O << "rep/movsb (%esi),(%edi)\n";
|
||||
return;
|
||||
case X86::REP_MOVSD:
|
||||
O << "rep/movsl (%esi),(%edi)\n";
|
||||
return;
|
||||
case X86::REP_MOVSW:
|
||||
O << "rep/movsw (%esi),(%edi)\n";
|
||||
return;
|
||||
case X86::REP_STOSB:
|
||||
O << "rep/stosb\n";
|
||||
return;
|
||||
case X86::REP_STOSD:
|
||||
O << "rep/stosl\n";
|
||||
return;
|
||||
case X86::REP_STOSW:
|
||||
O << "rep/stosw\n";
|
||||
return;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Call the autogenerated instruction printer routines.
|
||||
printInstruction(MI);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user