This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: gas: inconsistencies w/ immediates
- To: Andrew Morton <andrewm at uow dot edu dot au>
- Subject: Re: gas: inconsistencies w/ immediates
- From: Andreas Schwab <schwab at suse dot de>
- Date: Mon, 31 Jul 2000 15:12:53 +0200
- Cc: binutils at sourceware dot cygnus dot com
- References: <39856C37.2961D56D@uow.edu.au>
Andrew Morton <andrewm@uow.edu.au> writes:
|> Using HJ's 2.9.5.0.34 binutils release (x86):
|>
|> The handling of immediate constants appears to be inconsistent:
|>
|>
|> movl $1234,%eax
|>
|> OK, this moves an immediate into eax.
|>
|>
|> movl $1234/$10,%eax
|>
|> This fails because it is treating $10 as a label, not as a constant.
Isn't `$' part of the insn syntax (immediate prefix)? IMHO this should be
written as:
movl $1234/10,%eax
|> This bizarre handling of $NNN really bites because this is the format in
|> which compiler-generated constants come out of GCC. For example, suppose
|> you wish to do this:
|>
|>
|> foo()
|> {
|> asm(".equ SIZEOF_FOO,%0" :: "i" (sizeof foo));
^^
Try %c0.
Andreas.
--
Andreas Schwab "And now for something
SuSE Labs completely different."
Andreas.Schwab@suse.de
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg