diff options
author | Paolo Bonzini <bonzini@gnu.org> | 2004-05-25 12:04:17 +0000 |
---|---|---|
committer | Paolo Bonzini <bonzini@gcc.gnu.org> | 2004-05-25 12:04:17 +0000 |
commit | 2f93eea8612d4ced2eeee52db5ce66bd75303455 (patch) | |
tree | 0fecbc9fb7d6fe74247aea9809ba392638ca87c6 /gcc/rtlhooks-def.h | |
parent | 11338cda74ae54f5f8a86a271bcd04cb604ec806 (diff) | |
download | gcc-2f93eea8612d4ced2eeee52db5ce66bd75303455.zip gcc-2f93eea8612d4ced2eeee52db5ce66bd75303455.tar.gz gcc-2f93eea8612d4ced2eeee52db5ce66bd75303455.tar.bz2 |
Makefile.in (OBJS): Add rtlhooks.o.
2004-05-25 Paolo Bonzini <bonzini@gnu.org>
* Makefile.in (OBJS): Add rtlhooks.o.
(rtlanal.o): Depend on function.h.
(cse.o): Depend on rtlhooks-def.h.
(combine.o): Depend on rtlhooks-def.h.
(rtlhooks.o): New rule.
* combine.c: Include rtlhooks-def.h.
(nonzero_bits, cached_nonzero_bits, nonzero_bits1,
num_sign_bit_copies, cached_num_sign_bit_copies,
num_sign_bit_copies1): Move most of the code to rtlanal.c.
(reg_nonzero_bits_for_combine,
reg_num_sign_bit_copies_for_combine): New functions holding
the remnants of the above.
(combine_rtl_hooks): New.
(combine_instructions): Set rtl_hooks instead of gen_lowpart.
* cse.c: Include rtlhooks-def.h.
(cse_rtl_hooks): New.
(cse_main): Set rtl_hooks instead of gen_lowpart.
* emit-rtl.c (gen_lowpart): Remove.
(gen_lowpart_general): Move to rtlhooks.c.
* rtl.h (nonzero_bits, num_sign_bit_copies,
struct rtl_hooks, rtl_hooks, general_rtl_hooks): New.
(gen_lowpart_general): Remove.
(gen_lowpart): Temporarily redefine as a macro.
* rtlanal.c: Include function.h.
(nonzero_bits, cached_nonzero_bits, nonzero_bits1,
num_sign_bit_copies, cached_num_sign_bit_copies,
num_sign_bit_copies1): New, from combine.c.
* rtlhooks.c: New file.
From-SVN: r82234
Diffstat (limited to 'gcc/rtlhooks-def.h')
-rw-r--r-- | gcc/rtlhooks-def.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/gcc/rtlhooks-def.h b/gcc/rtlhooks-def.h new file mode 100644 index 0000000..aaae80c --- /dev/null +++ b/gcc/rtlhooks-def.h @@ -0,0 +1,46 @@ +/* Default macros to initialize an rtl_hooks data structure. + Copyright 2004 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GCC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GCC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + +#ifndef GCC_RTL_HOOKS_DEF_H +#define GCC_RTL_HOOKS_DEF_H + +#include "rtl.h" + +#define RTL_HOOKS_GEN_LOWPART gen_lowpart_general +#define RTL_HOOKS_REG_NONZERO_REG_BITS reg_nonzero_bits_general +#define RTL_HOOKS_REG_NUM_SIGN_BIT_COPIES reg_num_sign_bit_copies_general + +/* The structure is defined in rtl.h. */ +#define RTL_HOOKS_INITIALIZER { \ + RTL_HOOKS_GEN_LOWPART, \ + RTL_HOOKS_REG_NONZERO_REG_BITS, \ + RTL_HOOKS_REG_NUM_SIGN_BIT_COPIES, \ +} + +extern rtx gen_lowpart_general (enum machine_mode, rtx); +extern rtx reg_nonzero_bits_general (rtx, enum machine_mode, rtx, + enum machine_mode, + unsigned HOST_WIDE_INT, + unsigned HOST_WIDE_INT *); +extern rtx reg_num_sign_bit_copies_general (rtx, enum machine_mode, rtx, + enum machine_mode, + unsigned int, unsigned int *); + +#endif /* GCC_RTL_HOOKS_DEF_H */ |