diff options
author | Segher Boessenkool <segher@kernel.crashing.org> | 2014-12-10 19:28:57 +0100 |
---|---|---|
committer | Segher Boessenkool <segher@gcc.gnu.org> | 2014-12-10 19:28:57 +0100 |
commit | 7b7817713f7bd37c78b9c0bd5747579aa80f6245 (patch) | |
tree | acf16700f6bcfdf6c5bd51706c70bc16c550935e /gcc | |
parent | 29df5715c0a1817ba3ad76dd3e10c7fb6e235254 (diff) | |
download | gcc-7b7817713f7bd37c78b9c0bd5747579aa80f6245.zip gcc-7b7817713f7bd37c78b9c0bd5747579aa80f6245.tar.gz gcc-7b7817713f7bd37c78b9c0bd5747579aa80f6245.tar.bz2 |
re PR target/64180 (PowerPC carry bit improvements)
PR target/64180
* config/rs6000/rs6000.c (TARGET_MD_ASM_CLOBBERS): Define.
(rs6000_md_asm_clobbers): New function.
From-SVN: r218589
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 16 |
2 files changed, 22 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7073979..2d4a8f9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-12-10 Segher Boessenkool <segher@kernel.crashing.org> + + PR target/64180 + * config/rs6000/rs6000.c (TARGET_MD_ASM_CLOBBERS): Define. + (rs6000_md_asm_clobbers): New function. + 2014-12-10 Felix Yang <felix.yang@huawei.com> * config/aarch64/aarch64-protos.h (aarch64_function_profiler): Remove diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index be092a6..1c2070b 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -1556,6 +1556,9 @@ static const struct attribute_spec rs6000_attribute_table[] = #undef TARGET_ASM_LOOP_ALIGN_MAX_SKIP #define TARGET_ASM_LOOP_ALIGN_MAX_SKIP rs6000_loop_align_max_skip +#undef TARGET_MD_ASM_CLOBBERS +#define TARGET_MD_ASM_CLOBBERS rs6000_md_asm_clobbers + #undef TARGET_OPTION_OVERRIDE #define TARGET_OPTION_OVERRIDE rs6000_option_override @@ -3146,6 +3149,19 @@ rs6000_builtin_mask_calculate (void) | ((TARGET_LONG_DOUBLE_128) ? RS6000_BTM_LDBL128 : 0)); } +/* Implement TARGET_MD_ASM_CLOBBERS. All asm statements are considered + to clobber the XER[CA] bit because clobbering that bit without telling + the compiler worked just fine with versions of GCC before GCC 5, and + breaking a lot of older code in ways that are hard to track down is + not such a great idea. */ + +static tree +rs6000_md_asm_clobbers (tree, tree, tree clobbers) +{ + tree s = build_string (strlen (reg_names[CA_REGNO]), reg_names[CA_REGNO]); + return tree_cons (NULL_TREE, s, clobbers); +} + /* Override command line options. Mostly we process the processor type and sometimes adjust other TARGET_ options. */ |