final.c (output_addr_const): Don't assume at least one operand is a CONST_INT.
authorAlexandre Oliva <aoliva@redhat.com>
Fri, 1 Dec 2000 23:29:57 +0000 (23:29 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Fri, 1 Dec 2000 23:29:57 +0000 (23:29 +0000)
* final.c (output_addr_const) <PLUS>: Don't assume at least one
operand is a CONST_INT.

From-SVN: r37935

gcc/ChangeLog
gcc/final.c

index 6c94d07a5a25c9299421fc5c9c69d3d498706d37..007d98c4e8311474a7de6b053e2aedffbaabc53a 100644 (file)
@@ -1,5 +1,8 @@
 2000-12-01  Alexandre Oliva  <aoliva@redhat.com>
 
+       * final.c (output_addr_const) <PLUS>: Don't assume at least one
+       operand is a CONST_INT.
+
        * config/sh/sh.c (reg_class_from_letter): Assign `k' to SIBCALL_REGS.
        (machine_dependent_reorg): Split all insns.
        * config/sh/sh.h (CONDITIONAL_REGISTER_USAGE): Compute
index 46c09ee8e3465a3d37f32559ba34f8b8c7aabf9c..95e37226449d4245ae3972c3dc53f5633a0ba199 100644 (file)
@@ -3724,7 +3724,8 @@ output_addr_const (file, x)
       else
        {
          output_addr_const (file, XEXP (x, 0));
-         if (INTVAL (XEXP (x, 1)) >= 0)
+         if (GET_CODE (XEXP (x, 1)) != CONST_INT
+             || INTVAL (XEXP (x, 1)) >= 0)
            fprintf (file, "+");
          output_addr_const (file, XEXP (x, 1));
        }