diff options
author | danglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-12-28 07:51:17 +0000 |
---|---|---|
committer | danglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-12-28 07:51:17 +0000 |
commit | 5d7da0eea19b65555c587fb7c6805244aa2ae85e (patch) | |
tree | 9e9f425e99237648c78a8836866bd571eb8cf073 | |
parent | aaa3ff4c0dd087e7846c99c39e0a7ea009de122e (diff) | |
download | gcc-5d7da0eea19b65555c587fb7c6805244aa2ae85e.tar.gz |
* vax.c (vax_address_cost, vax_rtx_cost): Correct casts.
(vax_rtx_cost): Handle small offsets for both PLUS and MINUS.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@92667 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/vax/vax.c | 17 |
2 files changed, 14 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5526fcb685e..f1f57cb7946 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-12-27 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> + + * vax.c (vax_address_cost, vax_rtx_cost): Correct casts. + (vax_rtx_cost): Handle small offsets for both PLUS and MINUS. + 2004-12-27 Jeff Law <law@redhat.com> * tree-ssa-dom.c (thread_across_edge): Remove broken code to diff --git a/gcc/config/vax/vax.c b/gcc/config/vax/vax.c index da1b481d159..ca5fb6ac629 100644 --- a/gcc/config/vax/vax.c +++ b/gcc/config/vax/vax.c @@ -474,7 +474,7 @@ vax_address_cost_1 (register rtx addr) case CONST_INT: /* byte offsets cost nothing (on a VAX 2, they cost 1 cycle) */ if (offset == 0) - offset = (unsigned)(INTVAL(addr)+128) > 256; + offset = (unsigned HOST_WIDE_INT)(INTVAL(addr)+128) > 256; break; case CONST: case SYMBOL_REF: @@ -644,13 +644,13 @@ vax_rtx_costs_1 (register rtx x, enum rtx_code code, enum rtx_code outer_code) fmt = "e"; /* all constant rotate counts are short */ break; case PLUS: - /* Check for small negative integer operand: subl2 can be used with - a short positive constant instead. */ - if (GET_CODE (XEXP (x, 1)) == CONST_INT) - if ((unsigned)(INTVAL (XEXP (x, 1)) + 63) < 127) - fmt = "e"; case MINUS: c = (mode == DFmode) ? 13 : 8; /* 6/8 on VAX 9000, 16/15 on VAX 2 */ + /* Small integer operands can use subl2 and addl2. */ + if ((GET_CODE (XEXP (x, 1)) == CONST_INT) + && (unsigned HOST_WIDE_INT)(INTVAL (XEXP (x, 1)) + 63) < 127) + fmt = "e"; + break; case IOR: case XOR: c = 3; @@ -660,7 +660,7 @@ vax_rtx_costs_1 (register rtx x, enum rtx_code code, enum rtx_code outer_code) c = 3; if (GET_CODE (XEXP (x, 0)) == CONST_INT) { - if ((unsigned)~INTVAL (XEXP (x, 0)) > 63) + if ((unsigned HOST_WIDE_INT)~INTVAL (XEXP (x, 0)) > 63) c = 4; fmt = "e"; i = 1; @@ -713,7 +713,8 @@ vax_rtx_costs_1 (register rtx x, enum rtx_code code, enum rtx_code outer_code) switch (code) { case CONST_INT: - if ((unsigned)INTVAL (op) > 63 && GET_MODE (x) != QImode) + if ((unsigned HOST_WIDE_INT)INTVAL (op) > 63 + && GET_MODE (x) != QImode) c += 1; /* 2 on VAX 2 */ break; case CONST: |