@@ -25,11 +25,6 @@ using namespace llvm;
2525
2626#define DEBUG_TYPE " asm-printer"
2727
28- static cl::opt<bool > PrintZeroOffset (
29- " z80-print-zero-offset" ,
30- cl::desc (" Print ix + 0 instead of ix" ),
31- cl::init(false ),
32- cl::Hidden);
3328static cl::opt<bool > AddNegativeOffset (
3429 " z80-add-negative-offset" ,
3530 cl::desc (" Print ix + -1 instead of ix - 1" ),
@@ -39,18 +34,9 @@ static cl::opt<bool> AddNegativeOffset(
3934Z80InstPrinterCommon::Z80InstPrinterCommon (const MCAsmInfo &MAI,
4035 const MCInstrInfo &MII,
4136 const MCRegisterInfo &MRI)
42- : MCInstPrinter(MAI, MII, MRI), PrintZeroOffset(::PrintZeroOffset),
43- AddNegativeOffset(::AddNegativeOffset) {}
37+ : MCInstPrinter(MAI, MII, MRI), AddNegativeOffset(::AddNegativeOffset) {}
4438
4539bool Z80InstPrinterCommon::applyTargetSpecificCLOption (StringRef Opt) {
46- if (Opt == " print-zero-offset" ) {
47- PrintZeroOffset = true ;
48- return true ;
49- }
50- if (Opt == " no-print-zero-offset" ) {
51- PrintZeroOffset = false ;
52- return true ;
53- }
5440 if (Opt == " add-negative-offset" ) {
5541 AddNegativeOffset = true ;
5642 return true ;
@@ -137,8 +123,7 @@ void Z80InstPrinterCommon::printOffset(const MCInst *MI, unsigned Op,
137123 printOperand (MI, Op, OS);
138124 auto Offset = MI->getOperand (Op + 1 ).getImm ();
139125 assert (isInt<8 >(Offset) && " Offset out of range!" );
140- if (Offset || PrintZeroOffset)
141- OS << ' ' << (Offset >= 0 || AddNegativeOffset ? ' +' : ' -' ) << ' '
126+ OS << ' ' << (Offset >= 0 || AddNegativeOffset ? ' +' : ' -' ) << ' '
142127 << formatImm (AddNegativeOffset ? Offset : std::abs (Offset));
143128}
144129
0 commit comments