aboutsummaryrefslogtreecommitdiff
path: root/gcc/ira.c
diff options
context:
space:
mode:
authorVladimir N. Makarov <vmakarov@redhat.com>2021-03-09 17:18:58 -0500
committerVladimir N. Makarov <vmakarov@redhat.com>2021-03-09 17:19:52 -0500
commit63d74fed4566f1de583c368ecb9e2fc423fb1c87 (patch)
tree0ed66571b1d95369a74b717f9bebc3a80ed7700c /gcc/ira.c
parent0455cd76b687621f28488393c81d0854200a220a (diff)
downloadgcc-63d74fed4566f1de583c368ecb9e2fc423fb1c87.zip
gcc-63d74fed4566f1de583c368ecb9e2fc423fb1c87.tar.gz
gcc-63d74fed4566f1de583c368ecb9e2fc423fb1c87.tar.bz2
IRA: Process digital constraints containing more one digit
gcc/ChangeLog: * ira.c (ira_setup_alts, ira_get_dup_out_num): Process digital constraints > 9. * ira-lives.c (single_reg_class): Ditto.
Diffstat (limited to 'gcc/ira.c')
-rw-r--r--gcc/ira.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/gcc/ira.c b/gcc/ira.c
index c32ecf81..fc77131 100644
--- a/gcc/ira.c
+++ b/gcc/ira.c
@@ -1829,7 +1829,10 @@ ira_setup_alts (rtx_insn *insn)
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
{
- rtx other = recog_data.operand[c - '0'];
+ char *end;
+ unsigned long dup = strtoul (p, &end, 10);
+ rtx other = recog_data.operand[dup];
+ len = end - p;
if (MEM_P (other)
? rtx_equal_p (other, op)
: REG_P (op) || SUBREG_P (op))
@@ -1922,7 +1925,7 @@ ira_setup_alts (rtx_insn *insn)
int
ira_get_dup_out_num (int op_num, alternative_mask alts)
{
- int curr_alt, c, original, dup;
+ int curr_alt, c, original;
bool ignore_p, use_commut_op_p;
const char *str;
@@ -1969,18 +1972,22 @@ ira_get_dup_out_num (int op_num, alternative_mask alts)
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
- if (original != -1 && original != c)
- goto fail;
- original = c;
- break;
+ {
+ char *end;
+ int n = (int) strtoul (str, &end, 10);
+ str = end;
+ if (original != -1 && original != n)
+ goto fail;
+ original = n;
+ continue;
+ }
}
str += CONSTRAINT_LEN (c, str);
}
if (original == -1)
goto fail;
- dup = original - '0';
- if (recog_data.operand_type[dup] == OP_OUT)
- return dup;
+ if (recog_data.operand_type[original] == OP_OUT)
+ return original;
fail:
if (use_commut_op_p)
break;