[PATCH] D24247: [SPARC] Add assembler for the REX instruction set extension

Daniel Cederman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 17 04:00:38 PDT 2017


dcederman updated this revision to Diff 99266.
dcederman added a comment.

Thank you James for reviewing the patch!

In this updated version I have tried to address your comments and done the following changes:

- Expanded the fi suffix to say RexFixedRegImm and added a comment describing its use.
- Simplified the RexFR class as the imm field was always 0.
- Marked the case entries that are supposed to fall through with LLVM_FALLTHROUGH.
- Added assembler predicates to prevent REX instructions from being used when not compiling for REX and the other way around for Format 2 and coprocessor instructions.
- Switched from introducing new relocations to use already existing equivalent relocations (FK_Data_4 and FK_PCRel_4).
- I extracted the change to getCallTargetOpValue to its own patch as it is a generic bug fix and not related to the REX patch. This has the effect that one of the tests in this patch fails if the other patch is not applied.


https://reviews.llvm.org/D24247

Files:
  lib/Target/Sparc/AsmParser/SparcAsmParser.cpp
  lib/Target/Sparc/InstPrinter/SparcInstPrinter.cpp
  lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp
  lib/Target/Sparc/MCTargetDesc/SparcELFObjectWriter.cpp
  lib/Target/Sparc/MCTargetDesc/SparcFixupKinds.h
  lib/Target/Sparc/MCTargetDesc/SparcMCCodeEmitter.cpp
  lib/Target/Sparc/MCTargetDesc/SparcMCExpr.cpp
  lib/Target/Sparc/MCTargetDesc/SparcMCExpr.h
  lib/Target/Sparc/Sparc.td
  lib/Target/Sparc/SparcInstrAliases.td
  lib/Target/Sparc/SparcInstrInfo.td
  lib/Target/Sparc/SparcInstrRex.td
  lib/Target/Sparc/SparcRegisterInfo.td
  lib/Target/Sparc/SparcSubtarget.cpp
  lib/Target/Sparc/SparcSubtarget.h
  test/MC/Sparc/invalid-rex-instructions.s
  test/MC/Sparc/rex-instructions.s
  test/MC/Sparc/rex-nop-data.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24247.99266.patch
Type: text/x-patch
Size: 75026 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170517/13c20c01/attachment-0001.bin>


More information about the llvm-commits mailing list