Changes in directory llvm/lib/Target/X86:
X86ATTAsmPrinter.cpp updated: 1.19 -> 1.20 --- Log message: Work around some x86 Darwin assembler bugs --- Diffs of the changes: (+26 -0) X86ATTAsmPrinter.cpp | 26 ++++++++++++++++++++++++++ 1 files changed, 26 insertions(+) Index: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp diff -u llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.19 llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.20 --- llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.19 Sun Jan 22 17:37:17 2006 +++ llvm/lib/Target/X86/X86ATTAsmPrinter.cpp Wed Jan 25 20:27:43 2006 @@ -220,6 +220,32 @@ /// 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); } _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits