aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-05-21 19:26:56 +0000
committerRichard Stallman <rms@gnu.org>1992-05-21 19:26:56 +0000
commitb4ccaa16993e587a2ba5fff1af6670f8c599f7d8 (patch)
tree1adf3763a10d5b29bf2e9fb7fcd937c4ba914e07 /gcc
parente53c841d038337262176cb181780cb5359392ed7 (diff)
downloadgcc-b4ccaa16993e587a2ba5fff1af6670f8c599f7d8.zip
gcc-b4ccaa16993e587a2ba5fff1af6670f8c599f7d8.tar.gz
gcc-b4ccaa16993e587a2ba5fff1af6670f8c599f7d8.tar.bz2
*** empty log message ***
From-SVN: r1042
Diffstat (limited to 'gcc')
-rw-r--r--gcc/stmt.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c
index e55b2bd..6b87411 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -1000,7 +1000,7 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
rtx body;
int ninputs = list_length (inputs);
int noutputs = list_length (outputs);
- int nclobbers = list_length (clobbers);
+ int nclobbers;
tree tail;
register int i;
/* Vector of RTX's of evaluated output operands. */
@@ -1008,6 +1008,16 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
/* The insn we have emitted. */
rtx insn;
+ /* Count the number of meaningful clobbered registers, ignoring what
+ we would ignore later. */
+ nclobbers = 0;
+ for (tail = clobbers; tail; tail = TREE_CHAIN (tail))
+ {
+ char *regname = TREE_STRING_POINTER (TREE_VALUE (tail));
+ if (decode_reg_name (regname) >= 0)
+ ++nclobbers;
+ }
+
last_expr_type = 0;
for (i = 0, tail = outputs; tail; tail = TREE_CHAIN (tail), i++)
@@ -1168,7 +1178,7 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
/* Store (clobber REG) for each clobbered register specified. */
- for (tail = clobbers; tail; tail = TREE_CHAIN (tail), i++)
+ for (tail = clobbers; tail; tail = TREE_CHAIN (tail))
{
char *regname = TREE_STRING_POINTER (TREE_VALUE (tail));
int j = decode_reg_name (regname);
@@ -1183,7 +1193,7 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
}
/* Use QImode since that's guaranteed to clobber just one reg. */
- XVECEXP (body, 0, i)
+ XVECEXP (body, 0, i++)
= gen_rtx (CLOBBER, VOIDmode, gen_rtx (REG, QImode, j));
}