summaryrefslogtreecommitdiffstats
path: root/gcc/read-rtl.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-05-10 18:35:43 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-05-10 18:35:43 +0000
commit3a7ca9df23e499cb422225146c32b41c7b2a18ad (patch)
treece05352c7b32b19a3c31bab0a19f7e1e3355740c /gcc/read-rtl.c
parenteab4ad60e30f2629eb357673b3b2dd0084bbd12e (diff)
downloadppe42-gcc-3a7ca9df23e499cb422225146c32b41c7b2a18ad.tar.gz
ppe42-gcc-3a7ca9df23e499cb422225146c32b41c7b2a18ad.zip
* read-rtl.c (read_rtx): Allow 's' and 'T' strings to be omitted,
treating missing ones as "". * config/mips/mips.md: Remove constraints from match_operands and match_scratches if they appear in define_expands (except reload*), define_peephole2s, define_splits or attribute specifications. * config/mips/7000.md, config/mips/sb1.md: Remove match_operand constraint strings. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81676 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/read-rtl.c')
-rw-r--r--gcc/read-rtl.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/gcc/read-rtl.c b/gcc/read-rtl.c
index 21ad6dea418..d17235f5f61 100644
--- a/gcc/read-rtl.c
+++ b/gcc/read-rtl.c
@@ -651,26 +651,28 @@ again:
break;
case 'S':
- /* 'S' is an optional string: if a closeparen follows,
- just store NULL for this element. */
- c = read_skip_spaces (infile);
- ungetc (c, infile);
- if (c == ')')
- {
- XSTR (return_rtx, i) = 0;
- break;
- }
-
case 'T':
case 's':
{
char *stringbuf;
+ int star_if_braced;
+
+ c = read_skip_spaces (infile);
+ ungetc (c, infile);
+ if (c == ')')
+ {
+ /* 'S' fields are optional and should be NULL if no string
+ was given. Also allow normal 's' and 'T' strings to be
+ omitted, treating them in the same way as empty strings. */
+ XSTR (return_rtx, i) = (format_ptr[-1] == 'S' ? NULL : "");
+ break;
+ }
/* The output template slot of a DEFINE_INSN,
DEFINE_INSN_AND_SPLIT, or DEFINE_PEEPHOLE automatically
gets a star inserted as its first character, if it is
written with a brace block instead of a string constant. */
- int star_if_braced = (format_ptr[-1] == 'T');
+ star_if_braced = (format_ptr[-1] == 'T');
stringbuf = read_string (&rtl_obstack, infile, star_if_braced);
OpenPOWER on IntegriCloud