aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/X86
diff options
context:
space:
mode:
authorBrian Gaeke <gaeke@uiuc.edu>2003-08-13 18:15:15 +0000
committerBrian Gaeke <gaeke@uiuc.edu>2003-08-13 18:15:15 +0000
commit9d99b43fbcc2e8b7644e06ac26ce941b3719a190 (patch)
tree6e39390bf0cbd7aefd0e0fa09f39b90dfc072f1a /lib/Target/X86
parentfb5be090f59997deb7a2e89c92bac19528ba6755 (diff)
downloadexternal_llvm-9d99b43fbcc2e8b7644e06ac26ce941b3719a190.zip
external_llvm-9d99b43fbcc2e8b7644e06ac26ce941b3719a190.tar.gz
external_llvm-9d99b43fbcc2e8b7644e06ac26ce941b3719a190.tar.bz2
Factory methods for FunctionPasses now return type FunctionPass *.
Revert (to v1.55) one of the hunks of Chris's change that messed up the %-register workaround. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7815 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86')
-rw-r--r--lib/Target/X86/Printer.cpp11
-rw-r--r--lib/Target/X86/X86AsmPrinter.cpp11
2 files changed, 8 insertions, 14 deletions
diff --git a/lib/Target/X86/Printer.cpp b/lib/Target/X86/Printer.cpp
index 09fae4e..1a68844 100644
--- a/lib/Target/X86/Printer.cpp
+++ b/lib/Target/X86/Printer.cpp
@@ -81,7 +81,7 @@ namespace {
/// using the given target machine description. This should work
/// regardless of whether the function is in SSA form.
///
-Pass *createX86CodePrinterPass(std::ostream &o, TargetMachine &tm) {
+FunctionPass *createX86CodePrinterPass(std::ostream &o,TargetMachine &tm){
return new Printer(o, tm);
}
@@ -461,10 +461,10 @@ void Printer::printOp(const MachineOperand &MO,
}
// FALLTHROUGH
case MachineOperand::MO_MachineRegister:
- if (MO.getReg() < MRegisterInfo::FirstVirtualRegister) {
+ if (MO.getReg() < MRegisterInfo::FirstVirtualRegister)
// Bug Workaround: See note in Printer::doInitialization about %.
- O << RI.get(MO.getReg()).Name;
- } else
+ O << "%" << RI.get(MO.getReg()).Name;
+ else
O << "%reg" << MO.getReg();
return;
@@ -918,9 +918,6 @@ bool Printer::doInitialization(Module &M) {
// before being looked up in the symbol table. This creates spurious
// `undefined symbol' errors when linking. Workaround: Do not use `noprefix'
// mode, and decorate all register names with percent signs.
- //
- // Cygwin presumably doesn't have this problem, so drop the %'s.
- //
O << "\t.intel_syntax\n";
Mang = new Mangler(M, EmitCygwin);
return false; // success
diff --git a/lib/Target/X86/X86AsmPrinter.cpp b/lib/Target/X86/X86AsmPrinter.cpp
index 09fae4e..1a68844 100644
--- a/lib/Target/X86/X86AsmPrinter.cpp
+++ b/lib/Target/X86/X86AsmPrinter.cpp
@@ -81,7 +81,7 @@ namespace {
/// using the given target machine description. This should work
/// regardless of whether the function is in SSA form.
///
-Pass *createX86CodePrinterPass(std::ostream &o, TargetMachine &tm) {
+FunctionPass *createX86CodePrinterPass(std::ostream &o,TargetMachine &tm){
return new Printer(o, tm);
}
@@ -461,10 +461,10 @@ void Printer::printOp(const MachineOperand &MO,
}
// FALLTHROUGH
case MachineOperand::MO_MachineRegister:
- if (MO.getReg() < MRegisterInfo::FirstVirtualRegister) {
+ if (MO.getReg() < MRegisterInfo::FirstVirtualRegister)
// Bug Workaround: See note in Printer::doInitialization about %.
- O << RI.get(MO.getReg()).Name;
- } else
+ O << "%" << RI.get(MO.getReg()).Name;
+ else
O << "%reg" << MO.getReg();
return;
@@ -918,9 +918,6 @@ bool Printer::doInitialization(Module &M) {
// before being looked up in the symbol table. This creates spurious
// `undefined symbol' errors when linking. Workaround: Do not use `noprefix'
// mode, and decorate all register names with percent signs.
- //
- // Cygwin presumably doesn't have this problem, so drop the %'s.
- //
O << "\t.intel_syntax\n";
Mang = new Mangler(M, EmitCygwin);
return false; // success