diff options
author | Paolo Bonzini <bonzini@gnu.org> | 2005-03-21 14:30:51 +0000 |
---|---|---|
committer | Paolo Bonzini <bonzini@gcc.gnu.org> | 2005-03-21 14:30:51 +0000 |
commit | 9ce921aba837a0775de9abb3ea97e57d30f25e1f (patch) | |
tree | 681954762b33192c42f1a60a5211b189369f90af /gcc/rtlhooks.c | |
parent | 0a04ccc5712075b82b95dec4f52b4e9dc3303cd1 (diff) | |
download | gcc-9ce921aba837a0775de9abb3ea97e57d30f25e1f.zip gcc-9ce921aba837a0775de9abb3ea97e57d30f25e1f.tar.gz gcc-9ce921aba837a0775de9abb3ea97e57d30f25e1f.tar.bz2 |
rtl.h (struct rtx_hooks): Add gen_lowpart_no_emit.
2005-03-21 Paolo Bonzini <bonzini@gnu.org>
* rtl.h (struct rtx_hooks): Add gen_lowpart_no_emit.
* rtlhooks.c (gen_lowpart_no_emit_general): New.
* rtlhooks-def.h (gen_lowpart_no_emit_general): Declare.
(RTL_HOOKS_GEN_LOWPART_NO_EMIT): New.
* simplify-rtx.c (simplify_binary_operation_1): Use it.
From-SVN: r96799
Diffstat (limited to 'gcc/rtlhooks.c')
-rw-r--r-- | gcc/rtlhooks.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/rtlhooks.c b/gcc/rtlhooks.c index 49d4cfe..5303af5 100644 --- a/gcc/rtlhooks.c +++ b/gcc/rtlhooks.c @@ -79,6 +79,19 @@ gen_lowpart_general (enum machine_mode mode, rtx x) } } +/* Similar to gen_lowpart, but cannot emit any instruction via + copy_to_reg or force_reg. Mainly used in simplify-rtx.c. */ +rtx +gen_lowpart_no_emit_general (enum machine_mode mode, rtx x) +{ + rtx result = gen_lowpart_common (mode, x); + if (result) + return result; + if (mode != GET_MODE (x) && GET_MODE (x) != VOIDmode) + return gen_lowpart_SUBREG (mode, x); + return x; +} + rtx reg_num_sign_bit_copies_general (rtx x ATTRIBUTE_UNUSED, enum machine_mode mode ATTRIBUTE_UNUSED, |