aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/doc/rtl.texi4
-rw-r--r--gcc/genemit.c8
-rw-r--r--gcc/read-rtl.c9
3 files changed, 19 insertions, 2 deletions
diff --git a/gcc/doc/rtl.texi b/gcc/doc/rtl.texi
index 69c481f..edbc60f 100644
--- a/gcc/doc/rtl.texi
+++ b/gcc/doc/rtl.texi
@@ -1719,13 +1719,13 @@ of code @code{const_double} and therefore a syntactic alias has been
provided:
@smallexample
-(const_double_zero)
+(const_double_zero:@var{m})
@end smallexample
standing for:
@smallexample
-(const_double 0 0 @dots{})
+(const_double:@var{m} 0 0 @dots{})
@end smallexample
for matching the floating-point value zero, possibly the only useful one.
diff --git a/gcc/genemit.c b/gcc/genemit.c
index 3cd6499..89d9e99 100644
--- a/gcc/genemit.c
+++ b/gcc/genemit.c
@@ -195,6 +195,14 @@ gen_exp (rtx x, enum rtx_code subroutine_type, char *used, md_rtx_info *info)
return;
case CONST_DOUBLE:
+ /* Handle `const_double_zero' rtx. */
+ if (CONST_DOUBLE_REAL_VALUE (x)->cl == rvc_zero)
+ {
+ printf ("CONST_DOUBLE_ATOF (\"0\", %smode)",
+ GET_MODE_NAME (GET_MODE (x)));
+ return;
+ }
+ /* Fall through. */
case CONST_FIXED:
case CONST_WIDE_INT:
/* These shouldn't be written in MD files. Instead, the appropriate
diff --git a/gcc/read-rtl.c b/gcc/read-rtl.c
index 11e2686..9254028 100644
--- a/gcc/read-rtl.c
+++ b/gcc/read-rtl.c
@@ -1658,6 +1658,15 @@ rtx_reader::read_rtx_code (const char *code_name)
return_rtx = rtx_alloc (code);
memset (return_rtx, 0, RTX_CODE_SIZE (code));
PUT_CODE (return_rtx, code);
+ c = read_skip_spaces ();
+ if (c == ':')
+ {
+ file_location loc = read_name (&name);
+ record_potential_iterator_use (&modes, loc, return_rtx, 0,
+ name.string);
+ }
+ else
+ unread_char (c);
return return_rtx;
}