aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>2001-05-17 11:26:04 +0000
committerbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>2001-05-17 11:26:04 +0000
commitcf9473b55cd7e7accf475735fb9ff387f0d504e0 (patch)
tree5c297988c5b100706aafa72a34b9d8a1dc9fd9c9
parent055ca7fcbc45070532658a883f0886d7bac2246d (diff)
Fix c/2728
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@42195 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/stmt.c8
2 files changed, 11 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 922449992f4..72ea1fd02c2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2001-05-17 Bernd Schmidt <bernds@redhat.com>
+
+ * stmt.c (expand_asm_operands): For inout operands, make sure
+ the substitution of '=' for '+' makes it into the rtl.
+
2001-05-17 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
* gcc.texi (gccbug): Refer to the web pages for detailed information
diff --git a/gcc/stmt.c b/gcc/stmt.c
index 917f46ba609..433908aa024 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -1328,6 +1328,8 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
rtx *real_output_rtx = (rtx *) alloca (noutputs * sizeof (rtx));
enum machine_mode *inout_mode
= (enum machine_mode *) alloca (noutputs * sizeof (enum machine_mode));
+ const char **output_constraints
+ = alloca (noutputs * sizeof (const char *));
/* The insn we have emitted. */
rtx insn;
int old_generating_concat_p = generating_concat_p;
@@ -1426,6 +1428,7 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
message. */
constraint = TREE_STRING_POINTER (TREE_PURPOSE (tail));
+ output_constraints[i] = constraint;
c_len = strlen (constraint);
/* Allow the `=' or `+' to not be at the beginning of the string,
@@ -1455,6 +1458,7 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
memcpy (buf + 1, constraint, j);
memcpy (buf + 1 + j, p + 1, c_len - j); /* not -j-1 - copy null */
constraint = ggc_alloc_string (buf, c_len);
+ output_constraints[i] = constraint;
if (j)
warning (
@@ -1824,7 +1828,7 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
if (noutputs == 1 && nclobbers == 0)
{
ASM_OPERANDS_OUTPUT_CONSTRAINT (body)
- = TREE_STRING_POINTER (TREE_PURPOSE (outputs));
+ = output_constraints[0];
insn = emit_insn (gen_rtx_SET (VOIDmode, output_rtx[0], body));
}
@@ -1853,7 +1857,7 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
gen_rtx_ASM_OPERANDS
(GET_MODE (output_rtx[i]),
TREE_STRING_POINTER (string),
- TREE_STRING_POINTER (TREE_PURPOSE (tail)),
+ output_constraints[i],
i, argvec, constraints,
filename, line));