aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>1999-03-07 03:50:32 -0800
committerRichard Henderson <rth@gcc.gnu.org>1999-03-07 03:50:32 -0800
commitf4b94256028353cb595e68c5b96ab5aa1f13fe55 (patch)
tree4577eb329d99289f3f0a58b153a8b869615d963f
parent28c95eff94412989fb44ac2386ce1934af5a8b20 (diff)
downloadgcc-f4b94256028353cb595e68c5b96ab5aa1f13fe55.zip
gcc-f4b94256028353cb595e68c5b96ab5aa1f13fe55.tar.gz
gcc-f4b94256028353cb595e68c5b96ab5aa1f13fe55.tar.bz2
haifa-sched.c (ENCODE_BLOCKAGE): Don't shift unit too far.
* haifa-sched.c (ENCODE_BLOCKAGE): Don't shift unit too far. (print_exp): Special case addition of a constant. (print_value) [CONST_INT]: Use HOST_WIDE_INT_PRINT_HEX. From-SVN: r25629
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/haifa-sched.c19
2 files changed, 20 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4bb5592..a151f23 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+Sun Mar 7 11:48:56 1999 Richard Henderson <rth@cygnus.com>
+
+ * haifa-sched.c (ENCODE_BLOCKAGE): Don't shift unit too far.
+ (print_exp): Special case addition of a constant.
+ (print_value) [CONST_INT]: Use HOST_WIDE_INT_PRINT_HEX.
+
Sun Mar 7 11:21:02 1999 Richard Henderson <rth@cygnus.com>
* haifa-sched.c (reg_last_clobbers): New.
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index 3e39851..ca9040c 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -296,9 +296,9 @@ static unsigned int *insn_blockage;
#define UNIT_BITS 5
#define BLOCKAGE_MASK ((1 << BLOCKAGE_BITS) - 1)
#define ENCODE_BLOCKAGE(U, R) \
-((((U) << UNIT_BITS) << BLOCKAGE_BITS \
+(((U) << BLOCKAGE_BITS \
| MIN_BLOCKAGE_COST (R)) << BLOCKAGE_BITS \
- | MAX_BLOCKAGE_COST (R))
+ | MAX_BLOCKAGE_COST (R))
#define UNIT_BLOCKED(B) ((B) >> (2 * BLOCKAGE_BITS))
#define BLOCKAGE_RANGE(B) \
(((((B) >> BLOCKAGE_BITS) & BLOCKAGE_MASK) << (HOST_BITS_PER_INT / 2)) \
@@ -5832,8 +5832,17 @@ print_exp (buf, x, verbose)
{
case PLUS:
op[0] = XEXP (x, 0);
- st[1] = "+";
- op[1] = XEXP (x, 1);
+ if (GET_CODE (XEXP (x, 1)) == CONST_INT
+ && INTVAL (XEXP (x, 1)) < 0)
+ {
+ st[1] = "-";
+ op[1] = GEN_INT (-INTVAL (XEXP (x, 1)));
+ }
+ else
+ {
+ st[1] = "+";
+ op[1] = XEXP (x, 1);
+ }
break;
case LO_SUM:
op[0] = XEXP (x, 0);
@@ -6159,7 +6168,7 @@ print_value (buf, x, verbose)
switch (GET_CODE (x))
{
case CONST_INT:
- sprintf (t, "0x%lx", (long)INTVAL (x));
+ sprintf (t, HOST_WIDE_INT_PRINT_HEX, INTVAL (x));
cur = safe_concat (buf, cur, t);
break;
case CONST_DOUBLE: