[PATCH] D54685: [AArch64] Allow -mattr=use_el[1|2|3] and -mattr=use_sp_for_tp

Philip Derrin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 19 22:04:01 PDT 2019


philip.derrin added a comment.
Herald added a project: LLVM.

I will take over this patch; it was submitted by an intern at my employer who has since finished his internship.

In D54685#1343499 <https://reviews.llvm.org/D54685#1343499>, @olista01 wrote:

> What is the use-case for wanting to use SP_ELx for the thread pointer, instead of TPIDR_ELx?


This is not useful, and I will remove it. It was based on the observation that in some kernels, SP_ELx is left pointing at a thread-local exception context while the kernel switches to SP_EL0, so SP_ELx could double as a TLS pointer, leaving TPIDR_ELx free for other uses. However, SP_ELx is not accessible via the MRS instruction at ELx; it can only be accessed at higher levels. This is also presumably the reason SP_EL3 was left out — it is never accessible to MRS so `AArch64SysReg::SP_EL3` does not exist.

As for the naming of `use-el*`, would `tpidr-el*` be acceptable?


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D54685/new/

https://reviews.llvm.org/D54685





More information about the llvm-commits mailing list