[PATCH] D50694: [Sparc] Give the option to use the OS reserved global registers

Daniel Cederman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 20 00:52:54 PDT 2018


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

Added attributes to prevent %g2-%g5 from being used as scratch register or to allow the use of %g5-%g7 as scratch registers. %g5 is reserved by default for 32-bit but not for 64-bit.

Renamed the field names to ReserveRegG*.

Added error messages if the TLS model or stack protector tries to use %g7 and it is not reserved.

EmitFunctionBodyStart now checks the list of actually reserved registers to output the correct register annotations.


https://reviews.llvm.org/D50694

Files:
  lib/Target/Sparc/Sparc.td
  lib/Target/Sparc/SparcAsmPrinter.cpp
  lib/Target/Sparc/SparcISelLowering.cpp
  lib/Target/Sparc/SparcISelLowering.h
  lib/Target/Sparc/SparcInstrInfo.cpp
  lib/Target/Sparc/SparcRegisterInfo.cpp
  lib/Target/Sparc/SparcSubtarget.cpp
  lib/Target/Sparc/SparcSubtarget.h
  test/CodeGen/SPARC/64abi.ll
  test/CodeGen/SPARC/reserved-regs.ll
  test/CodeGen/SPARC/stack-protector.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50694.161427.patch
Type: text/x-patch
Size: 13541 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180820/0d3d6b72/attachment.bin>


More information about the llvm-commits mailing list