public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: Andrew Morton <andrewm@uow.edu.au>
Cc: binutils@sourceware.cygnus.com
Subject: Re: gas: inconsistencies w/ immediates
Date: Mon, 31 Jul 2000 06:12:00 -0000	[thread overview]
Message-ID: <200007311312.PAA14031@hawking.suse.de> (raw)
In-Reply-To: <39856C37.2961D56D@uow.edu.au>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1000 bytes --]

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

  reply	other threads:[~2000-07-31  6:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-07-31  5:08 Andrew Morton
2000-07-31  6:12 ` Andreas Schwab [this message]
2000-07-31  8:47   ` Alan Modra
2000-07-31 21:31 ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200007311312.PAA14031@hawking.suse.de \
    --to=schwab@suse.de \
    --cc=andrewm@uow.edu.au \
    --cc=binutils@sourceware.cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).