https://gcc.gnu.org/g:41fff7222ddf7bac471bcf8f768a2432a0346214
commit 41fff7222ddf7bac471bcf8f768a2432a0346214 Author: Jeevitha Palanisamy <[email protected]> Date: Fri Jul 10 04:31:23 2026 -0500 rs6000: Print DMR register names only with -mregnames Make %A honor -mregnames when printing DMR registers. Print %dmN only when -mregnames is enabled; otherwise print the numeric register number. Diff: --- gcc/config/rs6000/rs6000.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc index d816ffe02b4b..48337eaeb8d0 100644 --- a/gcc/config/rs6000/rs6000.cc +++ b/gcc/config/rs6000/rs6000.cc @@ -14259,10 +14259,11 @@ print_operand (FILE *file, rtx x, int code) output_operand_lossage ("invalid %%A value"); else #ifdef TARGET_REGNAMES - fprintf (file, "%%dm%d", (REGNO (x) - FIRST_DMR_REGNO)); -#else - fprintf (file, "%d", (REGNO (x) - FIRST_DMR_REGNO)); + if (TARGET_REGNAMES) + fprintf (file, "%%dm%d", REGNO (x) - FIRST_DMR_REGNO); + else #endif + fprintf (file, "%d", REGNO (x) - FIRST_DMR_REGNO); return; } if (!REG_P (x) || !FP_REGNO_P (REGNO (x)) || (REGNO (x) % 4) != 0)
