diff options
author | Segher Boessenkool <segher@kernel.crashing.org> | 2019-05-02 20:45:22 +0200 |
---|---|---|
committer | Segher Boessenkool <segher@gcc.gnu.org> | 2019-05-02 20:45:22 +0200 |
commit | f58bd252753e1c2458dc009a71726fca772643a8 (patch) | |
tree | 95801681e6a75e85817467963bd54941814cc925 | |
parent | b74c94ff419e8c69ae1bdaa291445377015d751e (diff) | |
download | gcc-f58bd252753e1c2458dc009a71726fca772643a8.zip gcc-f58bd252753e1c2458dc009a71726fca772643a8.tar.gz gcc-f58bd252753e1c2458dc009a71726fca772643a8.tar.bz2 |
rs6000: Debug regnums for TM registers
Since GCC 8, we have output incorrect numbers for the transactional
memory registers.
Also, we didn't output the correct DWARF register numbers for those.
The number for sprN is 100+N.
This fixes both these issues.
* config/rs6000/rs6000.c (rs6000_dbx_register_number): Return the
correct numbers for TFHAR, TFIAR, TEXASR.
From-SVN: r270819
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 22 |
2 files changed, 24 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9149eaa..88d8364 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-05-02 Segher Boessenkool <segher@kernel.crashing.org> + + * config/rs6000/rs6000.c (rs6000_dbx_register_number): Return the + correct numbers for TFHAR, TFIAR, TEXASR. + 2019-05-02 Richard Biener <rguenther@suse.de> PR tree-optimization/89653 diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index f0de18d..f8e9fd2 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -36269,10 +36269,20 @@ rs6000_init_dwarf_reg_sizes_extra (tree address) unsigned int rs6000_dbx_register_number (unsigned int regno, unsigned int format) { - /* Except for the above, we use the internal number for non-DWARF - debug information, and also for .eh_frame. */ + /* We use the GCC 7 (and before) internal number for non-DWARF debug + information, and also for .eh_frame. */ if ((format == 0 && write_symbols != DWARF2_DEBUG) || format == 2) - return regno; + { + /* Translate the regnos to their numbers in GCC 7 (and before). */ + if (regno == TFHAR_REGNO) + regno = 114; + else if (regno == TFIAR_REGNO) + regno = 115; + else if (regno == TEXASR_REGNO) + regno = 116; + + return regno; + } /* On some platforms, we use the standard DWARF register numbering for .debug_info and .debug_frame. */ @@ -36299,6 +36309,12 @@ rs6000_dbx_register_number (unsigned int regno, unsigned int format) return 356; if (regno == VSCR_REGNO) return 67; + if (regno == TFHAR_REGNO) + return 228; + if (regno == TFIAR_REGNO) + return 229; + if (regno == TEXASR_REGNO) + return 230; #endif return regno; } |