diff options
author | Alan Modra <amodra@gmail.com> | 2020-09-23 20:15:39 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-09-24 11:40:02 +0930 |
commit | 677b9150f54a0483d3de1182ac40717b7c4431a5 (patch) | |
tree | f96d51759ace552cccf159cd1f86378ba6b8bc90 /gcc | |
parent | 199baa71f7a6c8f255afdda03cd3b2644f8f0fcd (diff) | |
download | gcc-677b9150f54a0483d3de1182ac40717b7c4431a5.zip gcc-677b9150f54a0483d3de1182ac40717b7c4431a5.tar.gz gcc-677b9150f54a0483d3de1182ac40717b7c4431a5.tar.bz2 |
[RS6000] Built-in __PCREL__ define
Useful in assembly to know details of power10 function calls.
* config/rs6000/rs6000-c.c (rs6000_target_modify_macros):
Conditionally define __PCREL__.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/rs6000/rs6000-c.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/config/rs6000/rs6000-c.c b/gcc/config/rs6000/rs6000-c.c index f5982907..cc1e997 100644 --- a/gcc/config/rs6000/rs6000-c.c +++ b/gcc/config/rs6000/rs6000-c.c @@ -597,6 +597,9 @@ rs6000_target_modify_macros (bool define_p, HOST_WIDE_INT flags, /* Tell the user if we support the MMA instructions. */ if ((flags & OPTION_MASK_MMA) != 0) rs6000_define_or_undefine_macro (define_p, "__MMA__"); + /* Whether pc-relative code is being generated. */ + if ((flags & OPTION_MASK_PCREL) != 0) + rs6000_define_or_undefine_macro (define_p, "__PCREL__"); } void |