aboutsummaryrefslogtreecommitdiff
path: root/gcc/rtl.h
diff options
context:
space:
mode:
authorKenneth Zadeck <zadeck@naturalbridge.com>2012-11-09 13:18:49 +0000
committerKenneth Zadeck <zadeck@gcc.gnu.org>2012-11-09 13:18:49 +0000
commit33ffb5c5ab2327a980c9c656cf9a2b3c2dd39c1b (patch)
tree14eb70250d56758d9b1d2e729de8d07b9421d0c1 /gcc/rtl.h
parent3a15c2cf68b2e76a4c0d08361eaba35efa6b99f3 (diff)
downloadgcc-33ffb5c5ab2327a980c9c656cf9a2b3c2dd39c1b.zip
gcc-33ffb5c5ab2327a980c9c656cf9a2b3c2dd39c1b.tar.gz
gcc-33ffb5c5ab2327a980c9c656cf9a2b3c2dd39c1b.tar.bz2
rtl.h (CONST_SCALAR_INT_P): New macro.
2012-11-09 Kenneth Zadeck <zadeck@naturalbridge.com> * rtl.h (CONST_SCALAR_INT_P): New macro. * cfgexpand.c (expand_debug_locations): Changed to use CONST_SCALAR_INT_P macro. * combine.c (try_combine, subst, make_extraction, gen_lowpart_for_combine): Ditto. * cselib.c (entry_and_rtx_equal_p, rtx_equal_for_cselib_1): Ditto. * dwarf2out.c (loc_descriptor): Ditto. * emit-rtl.c (gen_lowpart_common): Ditto. * ira-costs.c (record_reg_classes, record_address_regs): Ditto. * ira-lives.c (single_reg_class): Ditto. * recog.c (simplify_while_replacing, asm_operand_ok, constrain_operands): Ditto. * reload.c (find_reloads): Ditto. * simplify-rtx.c (simplify_unary_operation_1, simplify_const_unary_operation, simplify_binary_operation_1, simplify_const_binary_operation, simplify_relational_operation_1, simplify_subreg): Ditto. From-SVN: r193360
Diffstat (limited to 'gcc/rtl.h')
-rw-r--r--gcc/rtl.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/rtl.h b/gcc/rtl.h
index 4ee27d9..16004e2c 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -432,6 +432,10 @@ struct GTY((variable_size)) rtvec_def {
#define CONST_DOUBLE_AS_INT_P(X) \
(GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) == VOIDmode)
+/* Predicate yielding true iff X is an rtx for a integer const. */
+#define CONST_SCALAR_INT_P(X) \
+ (CONST_INT_P (X) || CONST_DOUBLE_AS_INT_P (X))
+
/* Predicate yielding true iff X is an rtx for a double-int. */
#define CONST_DOUBLE_AS_FLOAT_P(X) \
(GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) != VOIDmode)