diff options
author | bonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-05 14:50:35 +0000 |
---|---|---|
committer | bonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-05 14:50:35 +0000 |
commit | f4a8fff406a4d226cfdf0d2dd19563e00041a46c (patch) | |
tree | 9063690ca6fe6c4afac8a638d99c0df2385390f6 /gcc/cse.c | |
parent | b0af589add2de49ce725e5321e0a3b77a97c1571 (diff) | |
download | gcc-f4a8fff406a4d226cfdf0d2dd19563e00041a46c.tar.gz |
2004-04-05 Paolo Bonzini <bonzini@gnu.org>
* combine.c (RTL_HOOKS_GEN_LOWPART_NO_EMIT): Use
gen_lowpart_for_combine.
* cse.c (gen_lowpart_if_possible): Move...
* rtlhooks.c (gen_lowpart_if_possible): ... here. Also try
gen_lowpart_SUBREG.
(gen_lowpart_no_emit_general): Use it.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97633 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cse.c')
-rw-r--r-- | gcc/cse.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/gcc/cse.c b/gcc/cse.c index 4d6f76d9328..5431da77160 100644 --- a/gcc/cse.c +++ b/gcc/cse.c @@ -4361,47 +4361,6 @@ equiv_constant (rtx x) return 0; } -/* Assuming that X is an rtx (e.g., MEM, REG or SUBREG) for a fixed-point - number, return an rtx (MEM, SUBREG, or CONST_INT) that refers to the - least-significant part of X. - MODE specifies how big a part of X to return. - - If the requested operation cannot be done, 0 is returned. - - This is similar to gen_lowpart_general in emit-rtl.c. */ - -rtx -gen_lowpart_if_possible (enum machine_mode mode, rtx x) -{ - rtx result = gen_lowpart_common (mode, x); - - if (result) - return result; - else if (MEM_P (x)) - { - /* This is the only other case we handle. */ - int offset = 0; - rtx new; - - if (WORDS_BIG_ENDIAN) - offset = (MAX (GET_MODE_SIZE (GET_MODE (x)), UNITS_PER_WORD) - - MAX (GET_MODE_SIZE (mode), UNITS_PER_WORD)); - if (BYTES_BIG_ENDIAN) - /* Adjust the address so that the address-after-the-data is - unchanged. */ - offset -= (MIN (UNITS_PER_WORD, GET_MODE_SIZE (mode)) - - MIN (UNITS_PER_WORD, GET_MODE_SIZE (GET_MODE (x)))); - - new = adjust_address_nv (x, mode, offset); - if (! memory_address_p (mode, XEXP (new, 0))) - return 0; - - return new; - } - else - return 0; -} - /* Given INSN, a jump insn, PATH_TAKEN indicates if we are following the "taken" branch. It will be zero if not. |