mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-11 02:04:56 +08:00
2f93eea861
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
47 lines
1.6 KiB
C
47 lines
1.6 KiB
C
/* 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 */
|