From 181eb737b28628adc4376b973610a02039385026 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Sun, 24 Feb 2008 00:56:13 +0000 Subject: Some platforms use the same name for 32-bit and 64-bit registers (like %r3 on PPC) in their ASM files. However, it's hard for humans to read during debugging. Adding a new field to the register data that lets you specify a different name to be printed than the one that goes into the ASM file -- %x3 instead of %r3, for instance. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47534 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/MachineInstr.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/CodeGen/MachineInstr.cpp') diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp index 911d5caa1d..e9262652c4 100644 --- a/lib/CodeGen/MachineInstr.cpp +++ b/lib/CodeGen/MachineInstr.cpp @@ -174,7 +174,7 @@ void MachineOperand::print(std::ostream &OS, const TargetMachine *TM) const { TM = &MF->getTarget(); if (TM) - OS << "%" << TM->getRegisterInfo()->get(getReg()).Name; + OS << "%" << TM->getRegisterInfo()->get(getReg()).PrintableName; else OS << "%mreg" << getReg(); } @@ -190,9 +190,9 @@ void MachineOperand::print(std::ostream &OS, const TargetMachine *TM) const { NeedComma = true; } if (isKill() || isDead()) { - if (NeedComma) OS << ","; - if (isKill()) OS << "kill"; - if (isDead()) OS << "dead"; + if (NeedComma) OS << ","; + if (isKill()) OS << "kill"; + if (isDead()) OS << "dead"; } OS << ">"; } -- cgit v1.2.3-70-g09d2