aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/mmix/mmix.c
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@bitrange.com>2001-12-30 16:48:59 +0000
committerHans-Peter Nilsson <hp@gcc.gnu.org>2001-12-30 16:48:59 +0000
commite9fef64c581d5893d6a8e836afbef0e76f75ecb9 (patch)
treef14933bc7e33f69bf9f09aa3bb51acf87467e54b /gcc/config/mmix/mmix.c
parentf6e67fa57e69c982c4895216323b74056fd3d7ad (diff)
downloadgcc-e9fef64c581d5893d6a8e836afbef0e76f75ecb9.zip
gcc-e9fef64c581d5893d6a8e836afbef0e76f75ecb9.tar.gz
gcc-e9fef64c581d5893d6a8e836afbef0e76f75ecb9.tar.bz2
mmix.md ("*call_real"): Fix typo in comment.
* config/mmix/mmix.md ("*call_real"): Fix typo in comment. * config/mmix/mmix.h (EXTRA_CONSTRAINT): Pass MMIX_REG_OK_STRICT to mmix_extra_constraint. * config/mmix/mmix.c (mmix_secondary_reload_class): Only handle non-global register classes. Mark now unused parameters as such. (mmix_extra_constraint, 'U'): Use new parameter strict and call calling memory_operand_p or strict_memory_address_p, not address_operand. * config/mmix/mmix-protos.h (mmix_extra_constraint): Add parameter. From-SVN: r48402
Diffstat (limited to 'gcc/config/mmix/mmix.c')
-rw-r--r--gcc/config/mmix/mmix.c31
1 files changed, 13 insertions, 18 deletions
diff --git a/gcc/config/mmix/mmix.c b/gcc/config/mmix/mmix.c
index 3269d5b..5227270 100644
--- a/gcc/config/mmix/mmix.c
+++ b/gcc/config/mmix/mmix.c
@@ -269,28 +269,15 @@ mmix_preferred_output_reload_class (x, class)
enum reg_class
mmix_secondary_reload_class (class, mode, x, in_p)
enum reg_class class;
- enum machine_mode mode;
- rtx x;
- int in_p;
+ enum machine_mode mode ATTRIBUTE_UNUSED;
+ rtx x ATTRIBUTE_UNUSED;
+ int in_p ATTRIBUTE_UNUSED;
{
if (class == REMAINDER_REG
|| class == HIMULT_REG
|| class == SYSTEM_REGS)
return GENERAL_REGS;
- if (mode != DImode || in_p)
- return NO_REGS;
-
- /* We have to help reload. */
- if (mode == DImode && GET_CODE (x) == MEM
- && ! address_operand (XEXP (x, 0), GET_MODE (x)))
- return GENERAL_REGS;
-
- /* FIXME: Optimize this; there are lots of PLUS:es that don't need a
- reload register. */
- if (GET_CODE (x) == PLUS)
- return GENERAL_REGS;
-
return NO_REGS;
}
@@ -330,14 +317,22 @@ mmix_const_double_ok_for_letter_p (value, c)
CONST_INT:s, but rather often as CONST_DOUBLE:s. */
int
-mmix_extra_constraint (x, c)
+mmix_extra_constraint (x, c, strict)
rtx x;
int c;
+ int strict;
{
HOST_WIDEST_INT value;
+ /* When checking for an address, we need to handle strict vs. non-strict
+ register checks. Don't use address_operand, but instead its
+ equivalent (its callee, which it is just a wrapper for),
+ memory_operand_p and the strict-equivalent strict_memory_address_p. */
if (c == 'U')
- return address_operand (x, Pmode);
+ return
+ strict
+ ? strict_memory_address_p (Pmode, x)
+ : memory_address_p (Pmode, x);
if (GET_CODE (x) != CONST_DOUBLE || GET_MODE (x) != VOIDmode)
return 0;