[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
Tue Aug 14 02:22:32 PDT 2018


dcederman created this revision.
dcederman added reviewers: jyknight, venkatra.
Herald added subscribers: llvm-commits, jrtc27, fedor.sergeev.

The g5, g6, and g7 registers can be used as temporary registers in generic code if they are not reserved for a specific usage by the OS or system libraries. This can for example be the case when compiling for a bare metal system or when compiling the OS kernel. In GCC the corresponding option is called -fcall-used-g[5,6,7] and is used when compiling the Linux kernel.

The code is simplified by using markSuperRegs() that also reserves the corresponding covering register pairs when needed.


Repository:
  rL LLVM

https://reviews.llvm.org/D50694

Files:
  lib/Target/Sparc/Sparc.td
  lib/Target/Sparc/SparcRegisterInfo.cpp
  lib/Target/Sparc/SparcSubtarget.cpp
  lib/Target/Sparc/SparcSubtarget.h
  test/CodeGen/SPARC/reserved-regs.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50694.160537.patch
Type: text/x-patch
Size: 4734 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180814/259ad584/attachment.bin>


More information about the llvm-commits mailing list