]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
s390.c (s390_O_constraint_str): Limit the range for 'On' to -4G+1..-1.
authorAndreas Krebbel <krebbel1@de.ibm.com>
Mon, 31 Mar 2008 11:32:41 +0000 (11:32 +0000)
committerAndreas Krebbel <krebbel@gcc.gnu.org>
Mon, 31 Mar 2008 11:32:41 +0000 (11:32 +0000)
2008-03-31  Andreas Krebbel  <krebbel1@de.ibm.com>

* config/s390/s390.c (s390_O_constraint_str): Limit the range
for 'On' to -4G+1..-1.
* config/s390/constraints.md: Adjust comment accordingly.

From-SVN: r133752

gcc/ChangeLog
gcc/config/s390/constraints.md
gcc/config/s390/s390.c

index 2307ea5538ead7132967bc3264f5498c14f98fa7..f806fe3504c981b104da51c5bb4ae5bb84c2f0af 100644 (file)
@@ -1,3 +1,9 @@
+2008-03-31  Andreas Krebbel  <krebbel1@de.ibm.com>
+
+       * config/s390/s390.c (s390_O_constraint_str): Limit the range
+       for 'On' to -4G+1..-1.
+       * config/s390/constraints.md: Adjust comment accordingly.
+
 2008-03-25  Maxim Kuvyrkov  <maxim@codesourcery.com>
 
        Backport from mainline:
index cdafa2fad31f1ac190c1da63650d3a6a723d8791..92fd3254ca5ab3d52c1f7dcf858b14d4f95951ce 100644 (file)
@@ -49,7 +49,7 @@
 ;;    O -- Multiple letter constraint followed by 1 parameter.
 ;;         s:  Signed extended immediate value (-2G .. 2G-1).
 ;;         p:  Positive extended immediate value (0 .. 4G-1).
-;;         n:  Negative extended immediate value (-4G .. -1).
+;;         n:  Negative extended immediate value (-4G+1 .. -1).
 ;;         These constraints do not accept any operand if the machine does
 ;;         not provide the extended-immediate facility.
 ;;    P -- Any integer constant that can be loaded without literal pool.
 
 (define_constraint "On"
   "@internal
-   Negative extended immediate value (-4G .. -1).
+   Negative extended immediate value (-4G+1 .. -1).
    This constraint will only match if the machine provides
    the extended-immediate facility."
   (and (match_code "const_int")
index 10246e238db7ee9b63e5ee0bb85cb40619c92573..355f257a91989f623b3bcc631e493af984c807f6 100644 (file)
@@ -2009,8 +2009,7 @@ s390_O_constraint_str (const char c, HOST_WIDE_INT value)
        || s390_single_part (GEN_INT (value), DImode, SImode, 0) == 1;
 
     case 'n':
-      return value == -1
-       || s390_single_part (GEN_INT (value), DImode, SImode, -1) == 1;
+      return s390_single_part (GEN_INT (value - 1), DImode, SImode, -1) == 1;
 
     default:
       gcc_unreachable ();