llvm-project/llvm/lib/Target/PowerPC/MCTargetDesc
Nemanja Ivanovic a59096759d [PowerPC] [NFC] Refactor code for printing register operands
We have an unfortunate situation in our back end where we have to keep pairs of
functions synchronized. Needless to say that this is not an ideal situation as
it is very difficult to enforce. Even without bugs, it's annoying to have to do
the same thing in two places.

This patch just refactors the code so that the two pairs of those functions that
pertain to printing register operands are unified:
  - stripRegisterPrefix() - this just removes the letter prefixes from registers
    for the InstrPrinter and AsmPrinter. This patch provides this as a static
    member of PPCRegisterInfo
  - Handling of PPCII::UseVSXReg - there are 3 places where we do something
    special for instructions with that flag set. Each of those places does its
    own checking of this flag and implements code customization. Any changes to
    how we print/encode VSX/VMX registers require modifying all 3 places. This
    patch unifies this into a static function in PPCInstrInfo that returns the
    register number adjusted as needed.

Differential revision: https://reviews.llvm.org/D52467

llvm-svn: 343195
2018-09-27 11:49:47 +00:00
..
CMakeLists.txt
LLVMBuild.txt
PPCAsmBackend.cpp [MC] Pass MCSubtargetInfo to fixupNeedsRelaxation and applyFixup 2018-06-06 09:40:06 +00:00
PPCELFObjectWriter.cpp [PowerPC] Add support for high and higha symbol modifiers on tls modifers. 2018-06-15 19:47:16 +00:00
PPCFixupKinds.h Don't repeat name in comment and format. NFC. 2017-06-28 17:23:13 +00:00
PPCMCAsmInfo.cpp Remove trailing space 2018-07-30 19:41:25 +00:00
PPCMCAsmInfo.h
PPCMCCodeEmitter.cpp [PowerPC] [NFC] Refactor code for printing register operands 2018-09-27 11:49:47 +00:00
PPCMCExpr.cpp [PPC64] Support "symbol@high" and "symbol@higha" symbol modifers. 2018-06-15 19:47:11 +00:00
PPCMCExpr.h [PPC64] Support "symbol@high" and "symbol@higha" symbol modifers. 2018-06-15 19:47:11 +00:00
PPCMCTargetDesc.cpp First step towards more human-friendly PPC assembler output: 2017-11-29 23:05:56 +00:00
PPCMCTargetDesc.h MC: Separate creating a generic object writer from creating a target object writer. NFCI. 2018-05-21 19:20:29 +00:00
PPCMachObjectWriter.cpp MC: Separate creating a generic object writer from creating a target object writer. NFCI. 2018-05-21 19:20:29 +00:00
PPCPredicates.cpp
PPCPredicates.h Remove trailing space 2018-07-30 19:41:25 +00:00