[AArch64] Support adding X[8-15,18] registers as CSRs.
authorTri Vo <trong@android.com>
Sat, 22 Sep 2018 22:17:50 +0000 (22:17 +0000)
committerTri Vo <trong@android.com>
Sat, 22 Sep 2018 22:17:50 +0000 (22:17 +0000)
commit6c47c62588573b7b902fe709abe2a31f4ee7238d
tree51582f9854108472f0bc428b96b36525b765f78b
parent88d8536566a8aff2f200986643c16587f2c077ba
[AArch64] Support adding X[8-15,18] registers as CSRs.

Summary:
Specifying X[8-15,18] registers as callee-saved is used to support
CONFIG_ARM64_LSE_ATOMICS in Linux kernel. As part of this patch we:
- use custom CSR list/mask when user specifies custom CSRs
- update Machine Register Info's list of CSRs with additional custom CSRs in
LowerCall and LowerFormalArguments.

Reviewers: srhines, nickdesaulniers, efriedma, javed.absar

Reviewed By: nickdesaulniers

Subscribers: kristof.beyls, jfb, llvm-commits

Differential Revision: https://reviews.llvm.org/D52216

llvm-svn: 342824
llvm/lib/Target/AArch64/AArch64.td
llvm/lib/Target/AArch64/AArch64CallLowering.cpp
llvm/lib/Target/AArch64/AArch64FastISel.cpp
llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp
llvm/lib/Target/AArch64/AArch64RegisterInfo.h
llvm/lib/Target/AArch64/AArch64Subtarget.cpp
llvm/lib/Target/AArch64/AArch64Subtarget.h
llvm/test/CodeGen/AArch64/arm64-custom-call-saved-reg.ll [new file with mode: 0644]
llvm/test/CodeGen/AArch64/arm64-reserve-call-saved-reg.ll [new file with mode: 0644]