-
- Downloads
arm: Extend -mtp= arguments
After discussing the -mtp= option with Arm's LLVM developers we'd like to extend the functionality of the option somewhat. There are actually 3 system registers that can be accessed for the thread pointer in aarch32: tpidrurw, tpidruro, tpidrprw. They are all read through the CP15 co-processor mechanism. The current -mtp=cp15 option reads the tpidruro register. This patch extends -mtp to allow for the above three explicit tpidr names and keeps -mtp=cp15 as an alias of -mtp=tpidruro for backwards compatibility. Bootstrapped and tested on arm-none-linux-gnueabihf. gcc/ChangeLog: * config/arm/arm-opts.h (enum arm_tp_type): Remove TP_CP15. Add TP_TPIDRURW, TP_TPIDRURO, TP_TPIDRPRW values. * config/arm/arm-protos.h (arm_output_load_tpidr): Declare prototype. * config/arm/arm.cc (arm_option_reconfigure_globals): Replace TP_CP15 with TP_TPIDRURO. (arm_output_load_tpidr): Define. * config/arm/arm.h (TARGET_HARD_TP): Define in terms of TARGET_SOFT_TP. * config/arm/arm.md (load_tp_hard): Call arm_output_load_tpidr to output assembly. (reload_tp_hard): Likewise. * config/arm/arm.opt (tpidrurw, tpidruro, tpidrprw): New values for arm_tp_type. * doc/invoke.texi (Arm Options, mtp): Document new values. gcc/testsuite/ChangeLog: * gcc.target/arm/mtp.c: New test. * gcc.target/arm/mtp_1.c: New test. * gcc.target/arm/mtp_2.c: New test. * gcc.target/arm/mtp_3.c: New test. * gcc.target/arm/mtp_4.c: New test.
Showing
- gcc/config/arm/arm-opts.h 3 additions, 1 deletiongcc/config/arm/arm-opts.h
- gcc/config/arm/arm-protos.h 1 addition, 0 deletionsgcc/config/arm/arm-protos.h
- gcc/config/arm/arm.cc 31 additions, 1 deletiongcc/config/arm/arm.cc
- gcc/config/arm/arm.h 1 addition, 1 deletiongcc/config/arm/arm.h
- gcc/config/arm/arm.md 2 additions, 2 deletionsgcc/config/arm/arm.md
- gcc/config/arm/arm.opt 10 additions, 1 deletiongcc/config/arm/arm.opt
- gcc/doc/invoke.texi 9 additions, 6 deletionsgcc/doc/invoke.texi
- gcc/testsuite/gcc.target/arm/mtp.c 8 additions, 0 deletionsgcc/testsuite/gcc.target/arm/mtp.c
- gcc/testsuite/gcc.target/arm/mtp_1.c 7 additions, 0 deletionsgcc/testsuite/gcc.target/arm/mtp_1.c
- gcc/testsuite/gcc.target/arm/mtp_2.c 7 additions, 0 deletionsgcc/testsuite/gcc.target/arm/mtp_2.c
- gcc/testsuite/gcc.target/arm/mtp_3.c 7 additions, 0 deletionsgcc/testsuite/gcc.target/arm/mtp_3.c
- gcc/testsuite/gcc.target/arm/mtp_4.c 7 additions, 0 deletionsgcc/testsuite/gcc.target/arm/mtp_4.c
Loading
Please register or sign in to comment