--- Comment #18 from balrogg at gmail dot com 2010-05-15 03:23 ---
(In reply to comment #11)
An example program that shows 3 different methods. Only one works (see
comment)
.c = 3, //Will not work
{.c = 3}, //works
{.c= 2}, //Does not work
For sake of documentation
--- Comment #4 from balrogg at gmail dot com 2009-03-16 16:53 ---
Reopening because
int params; __asm__ (xxx : =X (params));
and
int params[1]; __asm__ (xxx : =X (params[0]));
still produce different output in a way that is undocumented.
--
balrogg at gmail dot com changed
--- Comment #3 from balrogg at gmail dot com 2009-03-06 10:34 ---
(In reply to comment #2)
You need to use a memory clobber instead. =X (params[1]) says to GCC
that the asm operand 0 should be stored to params[1], which it does
(it allocates %eax to it).
Note that =r doesn't
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: balrogg at gmail dot com
GCC build triplet: x86_64-linux-gnu
GCC host triplet: x86_64-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39373
: gcc
Version: 4.3.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: balrogg at gmail dot com
GCC build triplet: x86_64-linux-gnu, arm-linux-gnueabi
GCC
--- Comment #1 from balrogg at gmail dot com 2009-03-05 02:55 ---
(In reply to comment #0)
Similarly for =X but not =m or =r.
Rather, similarly for =g.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39375
--- Comment #2 from balrogg at gmail dot com 2009-03-05 07:32 ---
Yes! I haven't executed it but correct assembly seems to be emitted for x86.
Marking INVALID.
--
balrogg at gmail dot com changed:
What|Removed |Added