aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/aarch64
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2019-09-19 14:36:24 +0000
committerRichard Henderson <rth@gcc.gnu.org>2019-09-19 07:36:24 -0700
commite3f15286d1129de2cceee6acd5d5584cb5422db6 (patch)
treeaed05ac7c1041b07231b5a25ae13c4f8d3e40014 /gcc/config/aarch64
parentefe126563bb8d28cb3958423a735d0021e75702f (diff)
downloadgcc-e3f15286d1129de2cceee6acd5d5584cb5422db6.zip
gcc-e3f15286d1129de2cceee6acd5d5584cb5422db6.tar.gz
gcc-e3f15286d1129de2cceee6acd5d5584cb5422db6.tar.bz2
aarch64: Extend %R for integer registers
* config/aarch64/aarch64.c (aarch64_print_operand): Allow integer registers with %R. From-SVN: r275964
Diffstat (limited to 'gcc/config/aarch64')
-rw-r--r--gcc/config/aarch64/aarch64.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 232317d..99d51e2 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -8420,7 +8420,7 @@ sizetochar (int size)
'S/T/U/V': Print a FP/SIMD register name for a register list.
The register printed is the FP/SIMD register name
of X + 0/1/2/3 for S/T/U/V.
- 'R': Print a scalar FP/SIMD register name + 1.
+ 'R': Print a scalar Integer/FP/SIMD register name + 1.
'X': Print bottom 16 bits of integer constant in hex.
'w/x': Print a general register name or the zero register
(32-bit or 64-bit).
@@ -8623,12 +8623,13 @@ aarch64_print_operand (FILE *f, rtx x, int code)
break;
case 'R':
- if (!REG_P (x) || !FP_REGNUM_P (REGNO (x)))
- {
- output_operand_lossage ("incompatible floating point / vector register operand for '%%%c'", code);
- return;
- }
- asm_fprintf (f, "q%d", REGNO (x) - V0_REGNUM + 1);
+ if (REG_P (x) && FP_REGNUM_P (REGNO (x)))
+ asm_fprintf (f, "q%d", REGNO (x) - V0_REGNUM + 1);
+ else if (REG_P (x) && GP_REGNUM_P (REGNO (x)))
+ asm_fprintf (f, "x%d", REGNO (x) - R0_REGNUM + 1);
+ else
+ output_operand_lossage ("incompatible register operand for '%%%c'",
+ code);
break;
case 'X':