diff options
author | Jeff Law <law@gcc.gnu.org> | 1997-12-06 17:31:01 -0700 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1997-12-06 17:31:01 -0700 |
commit | 956d69504d77d301015532d2f0564213f0efc706 (patch) | |
tree | ec80f8d1e46852ac1ba45aecdcda7201c302ac6f /gcc/regclass.c | |
parent | 27b6b158c29b45fd80c2f104d5da1f4bc818d7ab (diff) | |
download | gcc-956d69504d77d301015532d2f0564213f0efc706.tar.gz |
Merge from gcc-2.8
From-SVN: r16987
Diffstat (limited to 'gcc/regclass.c')
-rw-r--r-- | gcc/regclass.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/regclass.c b/gcc/regclass.c index db29999aee1..7d9edd26e96 100644 --- a/gcc/regclass.c +++ b/gcc/regclass.c @@ -1540,6 +1540,25 @@ record_address_regs (x, class, scale) else if (code1 == SYMBOL_REF || code1 == CONST || code1 == LABEL_REF) record_address_regs (arg0, INDEX_REG_CLASS, scale); + /* If both operands are registers but one is already a hard register + of index or base class, give the other the class that the hard + register is not. */ + + else if (code0 == REG && code1 == REG + && REGNO (arg0) < FIRST_PSEUDO_REGISTER + && (REG_OK_FOR_BASE_P (arg0) || REG_OK_FOR_INDEX_P (arg0))) + record_address_regs (arg1, + REG_OK_FOR_BASE_P (arg0) + ? INDEX_REG_CLASS : BASE_REG_CLASS, + scale); + else if (code0 == REG && code1 == REG + && REGNO (arg1) < FIRST_PSEUDO_REGISTER + && (REG_OK_FOR_BASE_P (arg1) || REG_OK_FOR_INDEX_P (arg1))) + record_address_regs (arg0, + REG_OK_FOR_BASE_P (arg1) + ? INDEX_REG_CLASS : BASE_REG_CLASS, + scale); + /* If one operand is known to be a pointer, it must be the base with the other operand the index. Likewise if the other operand is a MULT. */ |