[PATCH] D152433: [ARM,AArch64] Add a full set of -mtp= options.

Renato Golin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 8 04:00:11 PDT 2023


rengolin added a comment.

The only minor visible difference is the removal of `read-tp-hard` option from the LLVM side, which could be used by other downstream implementations.

I personally don't think this is a big deal. First, we don't promise stability on that layer, and second, it would be trivial to find out what the option has changed to.

This looks good to me, perhaps clearing the potential confusion on the commit message (inline comment).

Give it some time for other people to see it.

Thanks!
Renato



================
Comment at: clang/include/clang/Driver/Options.td:3525
+           "For AArch32: 'soft' uses a function call, or 'tpidrurw', 'tpidruro' or 'tpidrprw' use the three CP15 registers. 'cp15' is an alias for 'tpidruro'. "
+           "For AArch64: 'tpidr_el0', 'tpidr_el1', 'tpidr_el2', 'tpidr_el3' or 'tpidrro_el0' use the five system registers. 'elN' is an alias for 'tpidr_elN'.">;
 def mpure_code : Flag<["-"], "mpure-code">, Alias<mexecute_only>; // Alias for GCC compatibility
----------------
>From your comment:

> "In AArch32, on the other hand, the _only_ thread register you can choose (apart from 'none, use a function call') is the one that's read-only at EL0."

I inferred the current alias `el0` would map to the read-only version `tpidrro_el0`.

Looking at the implementation below (`AArch64ExpandPseudoInsts.cpp`), `EL0` seems to be the default when choosing the thread pointer?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D152433



More information about the cfe-commits mailing list