OSDN Git Service

* config/mmix/mmix.md ("*call_real"): Fix typo in comment.
authorhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 30 Dec 2001 16:48:59 +0000 (16:48 +0000)
committerhp <hp@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 30 Dec 2001 16:48:59 +0000 (16:48 +0000)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48402 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/mmix/mmix-protos.h
gcc/config/mmix/mmix.c
gcc/config/mmix/mmix.h
gcc/config/mmix/mmix.md

index cdeaee0..32d6170 100644 (file)
@@ -1,3 +1,15 @@
+2001-12-30  Hans-Peter Nilsson  <hp@bitrange.com>
+
+       * 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.
+
 2001-12-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * unroll.c: Move include files above first use of `const'.
index b936625..6e0b70c 100644 (file)
@@ -108,7 +108,7 @@ extern enum reg_class mmix_secondary_reload_class
   PARAMS ((enum reg_class, enum machine_mode, rtx, int));
 extern int mmix_const_ok_for_letter_p PARAMS ((HOST_WIDE_INT, int));
 extern int mmix_const_double_ok_for_letter_p PARAMS ((rtx, int));
-extern int mmix_extra_constraint PARAMS ((rtx, int));
+extern int mmix_extra_constraint PARAMS ((rtx, int, int));
 extern rtx mmix_dynamic_chain_address PARAMS ((rtx));
 extern rtx mmix_return_addr_rtx PARAMS ((int, rtx));
 extern rtx mmix_eh_return_stackadj_rtx PARAMS ((void));
index 3269d5b..5227270 100644 (file)
@@ -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;
index 8e81981..1c552d7 100644 (file)
@@ -589,7 +589,7 @@ enum reg_class
  mmix_const_ok_for_letter_p (VALUE, C)
 
 #define EXTRA_CONSTRAINT(VALUE, C)     \
- mmix_extra_constraint (VALUE, C)
+ mmix_extra_constraint (VALUE, C, MMIX_REG_OK_STRICT)
 
 /* Do we need anything serious here?  Yes, any FLOT constant.  */
 #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C)                 \
index 920d8a7..cdc43cd 100644 (file)
@@ -1038,7 +1038,7 @@ DIVU %1,%1,%2\;GET %0,:rR\;NEGU %2,0,%0\;CSNN %0,$255,%2")
 ;; rarely compared to addresses in registers, disparaging the
 ;; first ("p") alternative by adding ? in the first operand
 ;; might do the trick.  We define 'U' as a synonym to 'p', but without the
-;; caveats (and vary small advantages) of 'p'.
+;; caveats (and very small advantages) of 'p'.
 (define_insn "*call_real"
   [(call (mem:QI
          (match_operand:DI 0 "mmix_symbolic_or_address_operand" "s,rU"))