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
/// using the given target machine description. This should work
/// regardless of whether the function is in SSA form.
///
/// 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);
}
return new Printer(o, tm);
}
}
// FALLTHROUGH
case MachineOperand::MO_MachineRegister:
}
// FALLTHROUGH
case MachineOperand::MO_MachineRegister:
- if (MO.getReg() < MRegisterInfo::FirstVirtualRegister) {
+ if (MO.getReg() < MRegisterInfo::FirstVirtualRegister)
// Bug Workaround: See note in Printer::doInitialization about %.
// 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;
O << "%reg" << MO.getReg();
return;
// 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.
// 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
O << "\t.intel_syntax\n";
Mang = new Mangler(M, EmitCygwin);
return false; // success
/// using the given target machine description. This should work
/// regardless of whether the function is in SSA form.
///
/// 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);
}
return new Printer(o, tm);
}
}
// FALLTHROUGH
case MachineOperand::MO_MachineRegister:
}
// FALLTHROUGH
case MachineOperand::MO_MachineRegister:
- if (MO.getReg() < MRegisterInfo::FirstVirtualRegister) {
+ if (MO.getReg() < MRegisterInfo::FirstVirtualRegister)
// Bug Workaround: See note in Printer::doInitialization about %.
// 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;
O << "%reg" << MO.getReg();
return;
// 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.
// 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
O << "\t.intel_syntax\n";
Mang = new Mangler(M, EmitCygwin);
return false; // success