This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
# in constraints in asm statements.
- To: gcc-patches at gcc dot gnu dot org
- Subject: # in constraints in asm statements.
- From: Geoff Keating <geoffk at cygnus dot com>
- Date: Fri, 22 Sep 2000 11:02:20 -0700
GCC was complaining that '#' was not a valid character in a
constraint... This fixes it. glibc uses this on powerpc. I have
included a testcase, which I'll add to the testsuite.
Tested on powerpc-linux.
--
- Geoffrey Keating <geoffk@cygnus.com>
===File ~/patches/cygnus/gcc-asmhashmark.patch==============
2000-09-19 Geoff Keating <geoffk@cygnus.com>
* stmt.c (expand_asm_operands): Allow # in constraints.
Index: stmt.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/stmt.c,v
retrieving revision 1.169
diff -p -u -u -p -r1.169 stmt.c
--- stmt.c 2000/09/19 13:39:10 1.169
+++ stmt.c 2000/09/22 14:49:58
@@ -1476,7 +1476,7 @@ expand_asm_operands (string, outputs, in
}
break;
- case '?': case '!': case '*': case '&':
+ case '?': case '!': case '*': case '&': case '#':
case 'E': case 'F': case 'G': case 'H':
case 's': case 'i': case 'n':
case 'I': case 'J': case 'K': case 'L': case 'M':
@@ -1658,7 +1658,7 @@ expand_asm_operands (string, outputs, in
break;
case '<': case '>':
- case '?': case '!': case '*':
+ case '?': case '!': case '*': case '#':
case 'E': case 'F': case 'G': case 'H':
case 's': case 'i': case 'n':
case 'I': case 'J': case 'K': case 'L': case 'M':
============================================================
===File
~/cygnus/co/egcs-mainline/egcs/gcc/testsuite/gcc.c-torture/compile/20000922-1.c===
extern void doit(int);
void
quick_doit(int x)
{
#ifdef __OPTIMIZE__
if (__builtin_constant_p (x)
&& x != 0)
asm volatile ("%0" : : "i#*X"(x));
else
#endif
doit(x);
}
============================================================