aboutsummaryrefslogtreecommitdiff
path: root/gcc/rtlhooks-def.h
diff options
context:
space:
mode:
authorPaolo Bonzini <bonzini@gnu.org>2004-05-25 12:04:17 +0000
committerPaolo Bonzini <bonzini@gnu.org>2004-05-25 12:04:17 +0000
commitdb13b95eb3802381b0c864ee05a6304722e86857 (patch)
tree0fecbc9fb7d6fe74247aea9809ba392638ca87c6 /gcc/rtlhooks-def.h
parent149c616633e200a835cf433bfbd9d30101a2b51f (diff)
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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@82234 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/rtlhooks-def.h')
-rw-r--r--gcc/rtlhooks-def.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/gcc/rtlhooks-def.h b/gcc/rtlhooks-def.h
new file mode 100644
index 00000000000..aaae80cab8c
--- /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 */