summaryrefslogtreecommitdiff
path: root/gcc/genattrtab.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-31 21:06:59 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-31 21:06:59 +0000
commit26173369bef1fde8e17f4e0f69567d8cae2f76f6 (patch)
treea85157de90f18a976c4a35c69be1bc3cb6be9765 /gcc/genattrtab.c
parent7fb220f35def84c75d2b837735bfb4ce48dc5098 (diff)
downloadgcc-26173369bef1fde8e17f4e0f69567d8cae2f76f6.tar.gz
gcc/
* doc/md.texi: Describe the use of match_tests in attribute tests. * rtl.def (MATCH_TEST): Update commentary. * genattrtab.c (attr_copy_rtx, check_attr_test, clear_struct_flag) (write_test_expr, walk_attr_value): Handle MATCH_TEST. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178388 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/genattrtab.c')
-rw-r--r--gcc/genattrtab.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c
index 69e08506fe5..4a4c2a2c8aa 100644
--- a/gcc/genattrtab.c
+++ b/gcc/genattrtab.c
@@ -658,6 +658,7 @@ attr_copy_rtx (rtx orig)
case CONST_DOUBLE:
case CONST_VECTOR:
case SYMBOL_REF:
+ case MATCH_TEST:
case CODE_LABEL:
case PC:
case CC0:
@@ -841,6 +842,11 @@ check_attr_test (rtx exp, int is_const, int lineno)
XEXP (exp, 0) = check_attr_test (XEXP (exp, 0), is_const, lineno);
break;
+ case MATCH_TEST:
+ exp = attr_rtx (MATCH_TEST, XSTR (exp, 0));
+ ATTR_IND_SIMPLIFIED_P (exp) = 1;
+ break;
+
case MATCH_OPERAND:
if (is_const)
fatal ("RTL operator \"%s\" not valid in constant attribute test",
@@ -2907,6 +2913,7 @@ clear_struct_flag (rtx x)
case CONST_INT:
case CONST_DOUBLE:
case CONST_VECTOR:
+ case MATCH_TEST:
case SYMBOL_REF:
case CODE_LABEL:
case PC:
@@ -3571,6 +3578,12 @@ write_test_expr (rtx exp, unsigned int attrs_cached, int flags)
printf (HOST_WIDE_INT_PRINT_DEC, XWINT (exp, 0));
break;
+ case MATCH_TEST:
+ print_c_condition (XSTR (exp, 0));
+ if (flags & FLG_BITWISE)
+ printf (" != 0");
+ break;
+
/* A random C expression. */
case SYMBOL_REF:
print_c_condition (XSTR (exp, 0));
@@ -3765,6 +3778,7 @@ walk_attr_value (rtx exp)
must_extract = 1;
return;
+ case MATCH_TEST:
case EQ_ATTR_ALT:
must_extract = must_constrain = 1;
break;