diff options
author | Paolo Bonzini <bonzini@gnu.org> | 2006-02-28 20:32:20 +0000 |
---|---|---|
committer | Adam Nemet <nemet@gcc.gnu.org> | 2006-02-28 20:32:20 +0000 |
commit | d3b726902460a92cefbb1be7472d2cafece201ed (patch) | |
tree | b59a2ff0c0c65abbe656b96ae1d8a37028083f6b /gcc/rtl.h | |
parent | e5c7f9f582b4148974efae8c9289652601909753 (diff) | |
download | gcc-d3b726902460a92cefbb1be7472d2cafece201ed.zip gcc-d3b726902460a92cefbb1be7472d2cafece201ed.tar.gz gcc-d3b726902460a92cefbb1be7472d2cafece201ed.tar.bz2 |
rtl.h (truncated_to_mode): Declare it.
* rtl.h (truncated_to_mode): Declare it.
(struct rtl_hooks): Add reg_truncated_to_mode hook.
* rtlhooks-def.h (RTL_HOOKS_REG_TRUNCATED_TO_MODE): New macro.
(RTL_HOOKS_INITIALIZER): Include it.
* rtlhooks.c (reg_truncated_to_mode_general): New function.
* combine.c (RTL_HOOKS_REG_TRUNCATED_TO_MODE): Override to
reg_truncated_to_mode.
* rtlanal.c (truncated_to_mode): Define it.
* simplify-rtx.c (simplify_unary_operation_1): Use it.
Co-Authored-By: Adam Nemet <anemet@caviumnetworks.com>
From-SVN: r111573
Diffstat (limited to 'gcc/rtl.h')
-rw-r--r-- | gcc/rtl.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1047,6 +1047,7 @@ extern unsigned int subreg_regno (rtx); extern unsigned HOST_WIDE_INT nonzero_bits (rtx, enum machine_mode); extern unsigned int num_sign_bit_copies (rtx, enum machine_mode); extern bool constant_pool_constant_p (rtx); +extern bool truncated_to_mode (enum machine_mode, rtx); /* 1 if RTX is a subreg containing a reg that is already known to be @@ -2277,8 +2278,9 @@ struct rtl_hooks unsigned HOST_WIDE_INT, unsigned HOST_WIDE_INT *); rtx (*reg_num_sign_bit_copies) (rtx, enum machine_mode, rtx, enum machine_mode, unsigned int, unsigned int *); + bool (*reg_truncated_to_mode) (enum machine_mode, rtx); - /* Whenever you add entries here, make sure you adjust hosthooks-def.h. */ + /* Whenever you add entries here, make sure you adjust rtlhooks-def.h. */ }; /* Each pass can provide its own. */ |