aix: Permit use of AIX Vector extended ABI mode
commit2e7750cb518f5abedbd6fb2725882079a6934dce
authorDavid Edelsohn <dje.gcc@gmail.com>
Wed, 27 Jan 2021 21:47:22 +0000 (27 16:47 -0500)
committerDavid Edelsohn <dje.gcc@gmail.com>
Sat, 30 Jan 2021 17:08:00 +0000 (30 12:08 -0500)
tree3c2f26f33e101db09a2eebcdd6824214e9c96674
parent92dd3e71f957c7818f4ce4189bd187b59af20d9b
aix: Permit use of AIX Vector extended ABI mode

AIX only permits use of Altivec VSRs 20-31 in a Vector Extended ABI mode.
This patch explicitly enables use of the VSRs using the new -mabi=vec-extabi
command line option also implemented in LLVM for AIX.

Bootstrapped on powerpc-ibm-aix7.2.3.0 and powerpc64le-linux-gnu.

gcc/ChangeLog:

* config/rs6000/rs6000.opt (mabi=vec-extabi): New.
(mabi=vec-default): New.
* config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Define
__EXTABI__ for AIX Vector extended ABI.
* config/rs6000/rs6000.c (rs6000_debug_reg_global): Print AIX Vector
extabi info.
(conditional_register_usage): If AIX vec_extabi enabled, vs20-vs31
are non-volatile.
* doc/invoke.texi (PowerPC mabi): Add AIX vec-extabi and vec-default.
gcc/config/rs6000/rs6000-c.c
gcc/config/rs6000/rs6000.c
gcc/config/rs6000/rs6000.opt
gcc/doc/invoke.texi