Commit c09e6498 by Richard Stallman

*** empty log message ***

From-SVN: r1207
parent c1f7c223
...@@ -1012,7 +1012,8 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line) ...@@ -1012,7 +1012,8 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
for (tail = clobbers; tail; tail = TREE_CHAIN (tail)) for (tail = clobbers; tail; tail = TREE_CHAIN (tail))
{ {
char *regname = TREE_STRING_POINTER (TREE_VALUE (tail)); char *regname = TREE_STRING_POINTER (TREE_VALUE (tail));
if (decode_reg_name (regname) >= 0) i = decode_reg_name (regname);
if (i >= 0 || i == -4)
++nclobbers; ++nclobbers;
} }
...@@ -1183,9 +1184,15 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line) ...@@ -1183,9 +1184,15 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
if (j < 0) if (j < 0)
{ {
if (j == -3) if (j == -3) /* `cc', which is not a register */
continue; continue;
if (j == -4) /* `memory', don't cache memory across asm */
{
XVECEXP (body, 0, i++) = gen_rtx (CLOBBER, VOIDmode, const0_rtx);
continue;
}
error ("unknown register name `%s' in `asm'", regname); error ("unknown register name `%s' in `asm'", regname);
return; return;
} }
......
...@@ -212,8 +212,9 @@ strip_reg_name (name) ...@@ -212,8 +212,9 @@ strip_reg_name (name)
/* Decode an `asm' spec for a declaration as a register name. /* Decode an `asm' spec for a declaration as a register name.
Return the register number, or -1 if nothing specified, Return the register number, or -1 if nothing specified,
or -2 if the ASMSPEC is not `cc' and is not recognized, or -2 if the ASMSPEC is not `cc' or `memory' and is not recognized,
or -3 if ASMSPEC is `cc' and is not recognized. or -3 if ASMSPEC is `cc' and is not recognized,
or -4 if ASMSPEC is `memory' and is not recognized.
Accept an exact spelling or a decimal number. Accept an exact spelling or a decimal number.
Prefixes such as % are optional. */ Prefixes such as % are optional. */
...@@ -257,6 +258,9 @@ decode_reg_name (asmspec) ...@@ -257,6 +258,9 @@ decode_reg_name (asmspec)
} }
#endif /* ADDITIONAL_REGISTER_NAMES */ #endif /* ADDITIONAL_REGISTER_NAMES */
if (!strcmp (asmspec, "memory"))
return -4;
if (!strcmp (asmspec, "cc")) if (!strcmp (asmspec, "cc"))
return -3; return -3;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment