mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
Replace TargetRegisterInfo::printReg with a PrintReg class that also works without a TRI instance.
Print virtual registers numbered from 0 instead of the arbitrary FirstVirtualRegister. The first virtual register is printed as %vreg0. TRI::NoRegister is printed as %noreg. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123107 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -374,12 +374,7 @@ void Location::print(raw_ostream &OS, const TargetRegisterInfo *TRI) {
|
||||
return;
|
||||
default:
|
||||
if (isReg()) {
|
||||
if (TargetRegisterInfo::isVirtualRegister(Kind)) {
|
||||
OS << "%reg" << Kind;
|
||||
if (Data.SubIdx)
|
||||
OS << ':' << TRI->getSubRegIndexName(Data.SubIdx);
|
||||
} else
|
||||
OS << '%' << TRI->getName(Kind);
|
||||
OS << PrintReg(Kind, TRI, Data.SubIdx);
|
||||
} else {
|
||||
OS << "fi#" << ~Kind;
|
||||
if (Data.Offset)
|
||||
|
Reference in New Issue
Block a user