diff options
author | Richard Sandiford <rsandifo@redhat.com> | 2004-05-10 18:35:43 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2004-05-10 18:35:43 +0000 |
commit | 62d4592363e21433046e6ab066f94203b9da8edd (patch) | |
tree | ce05352c7b32b19a3c31bab0a19f7e1e3355740c /gcc/read-rtl.c | |
parent | af434fa7a17e1dadd41821663b754cde38ab3810 (diff) | |
download | gcc-62d4592363e21433046e6ab066f94203b9da8edd.tar.gz |
read-rtl.c (read_rtx): Allow 's' and 'T' strings to be omitted, treating missing ones as "".
* 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.
From-SVN: r81676
Diffstat (limited to 'gcc/read-rtl.c')
-rw-r--r-- | gcc/read-rtl.c | 24 |
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); |