From 651a36e333ad720eaff2145132cbcbb29f4e1df4 Mon Sep 17 00:00:00 2001 From: Andreas Krebbel Date: Fri, 12 May 2006 07:51:35 +0000 Subject: [PATCH] s390.c (s390_const_ok_for_constraint_p): Disallow -4G for On contraint. 2006-05-12 Andreas Krebbel * config/s390/s390.c (s390_const_ok_for_constraint_p): Disallow -4G for On contraint. * config/s390/s390.md: Adjust comment describing On constraint. From-SVN: r113721 --- gcc/ChangeLog | 6 ++++++ gcc/config/s390/s390.c | 6 ++++-- gcc/config/s390/s390.md | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fff21913b9ef..e8f8d0763213 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2006-05-12 Andreas Krebbel + + * config/s390/s390.c (s390_const_ok_for_constraint_p): Disallow -4G for + On contraint. + * config/s390/s390.md: Adjust comment describing On constraint. + 2006-05-11 Jan Hubicka * cgraphunit.c (decide_is_function_needed): Don't force always_inline diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index fdd4b5c54316..e55686dae07a 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -2075,8 +2075,10 @@ s390_const_ok_for_constraint_p (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 + (value == -1 + || s390_single_part (GEN_INT (value), DImode, SImode, -1) == 1) + && value != -((HOST_WIDE_INT)1 << 32); default: gcc_unreachable (); diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md index 54822da80813..6459c81b474b 100644 --- a/gcc/config/s390/s390.md +++ b/gcc/config/s390/s390.md @@ -50,7 +50,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.