This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: inline assembly operands
- From: Luchezar Belev <l_belev at yahoo dot com>
- To: Jim Wilson <wilson at specifixinc dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Sun, 25 Jul 2004 08:31:58 -0700 (PDT)
- Subject: Re: inline assembly operands
--- Jim Wilson <wilson@specifixinc.com> wrote:
> > asm (".equ A, %0"::"i"(sizeof(something)));
> > /* and compile with -masm=intel to make the
> > * compiler not to prefix the "immediate operand" */
>
> There is usually a print code you can use to solve this. %a0 works fine
> for x86, and probably also for many other targets.
I cant find anything about such print codes in the documentation.
Specifically I loked in the node "Extended Asm" of gcc.info.
Are these codes documented somewhere?
> > but now it seems unreliable since with the new
> > unit-at-a-time feature the compiler may reorder
> > the functions and top-level asm statements arbitrarily.
>
> Yes. It won't be reliable unless you use -fno-unit-at-a-time.
Ok, this option would perfectly do the job, if it is here to stay,
but I'm concerned about the following statement in
http://gcc.gnu.org/gcc-3.4/changes.html#3.4.1
quote: "As a temporary workaround, -fno-unit-at-a-time can be used,
but this scheme may not be supported by future releases of GCC."
So it sounds like one cannot count on this option too.
lucho
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail