https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110908
--- Comment #7 from zach-gcc at cs dot stanford.edu ---
FYI: the behavior requested in this issue used to be supported by LLVM/Clang
with the -ffixed-x30 flag, but has now been renamed to -mlr-for-calls-only. See
https://clang.llvm.org/docs/Clang
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110908
--- Comment #6 from zach-gcc at cs dot stanford.edu ---
I've resumed using GCC for this project, where I am instrumenting assembly and
require that x30 only ever contain addresses (not arbitrary data). I ran into a
case where GCC was storing data
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110908
--- Comment #5 from zach-gcc at cs dot stanford.edu ---
I am implementing software fault isolation on top of GCC and would like for GCC
to only ever store addresses in x30. Use of x30 in its link register role is
desired (saving/restoring etc. is
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110908
Richard Earnshaw changed:
What|Removed |Added
Last reconfirmed||2023-08-07
Status|UNCONF
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110908
--- Comment #3 from Andrew Pinski ---
This is most likely the fix:
diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc
index 7cd230c4602..4d26c8789ce 100644
--- a/gcc/config/aarch64/aarch64.cc
+++ b/gcc/config/aarch64/aarc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110908
--- Comment #2 from Andrew Pinski ---
Does LLVM still save/restore LR with -ffixed-x30 ?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110908
--- Comment #1 from Andrew Pinski ---
```
Treat the register named reg as a fixed register; generated code should never
refer to it (except perhaps as a stack pointer, frame pointer or in some other
fixed role).
```