public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Falk Hueffner <falk@debian.org>
To: Dan Kegel <dank@kegel.com>
Cc: GCC Mailing List <gcc@gcc.gnu.org>
Subject: Re: gcc-4.1-20050709: alpha: "macro requires $at register while noat in effect" while compiling Linux kernel
Date: Mon, 11 Jul 2005 06:58:00 -0000	[thread overview]
Message-ID: <873bql96dl.fsf@debian.org> (raw)
In-Reply-To: <42D1CAAA.2010100@kegel.com> (Dan Kegel's message of "Sun, 10 Jul 2005 18:26:02 -0700")

Dan Kegel <dank@kegel.com> writes:

> Can somebody familiar with inline assembly guess whether the source
> or the compiler are wrong here?
>
> --- snip ---
> inline unsigned int
> cia_bwx_ioread8(void *a)
> {
>   return ({ unsigned char __kir; __asm__("ldbu %0,%1" : "=r"(__kir) : "m"(*(volatile unsigned char *)a)); __kir; });
> }
> --- snip ---
>
> $ alpha-unknown-linux-gnu-gcc -fno-common -ffreestanding -O2 \
> -mno-fp-regs -ffixed-8 -msmall-data -mcpu=ev5 -Wa,-mev6 -c core_cia.i
>
> /tmp/ccmvyEzr.s: Assembler messages:
> /tmp/ccmvyEzr.s:16: Error: macro requires $at register while noat in effect

The "ldbu" instruction is only available on ev56 and above, however,
gcc4.1 emits ".arch ev5" because of "-mcpu=ev5", which overrides as's
"-mev6". This used to work because 4.0 didn't output ".arch ev5"
because it doesn't actually do anything important.

I don't see any fault on gcc's side here. You could argue that the
command line option for as should override the ".arch", but I think
it's been like this forever. So you should probably just add ".arch
ev6" inside the asm (annoyingly, gas doesn't seem to have ".arch any"
or similar).

-- 
	Falk

  reply	other threads:[~2005-07-11  6:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-10  5:19 gcc-4.1-20050709: ICE in loop_givs_rescan, at loop.c:5517 Dan Kegel
2005-07-10 12:23 ` Joseph S. Myers
2005-07-10 13:02 ` Falk Hueffner
2005-07-10 16:26   ` Dan Kegel
2005-07-11  1:51     ` gcc-4.1-20050709: ICE in compare_values, at tree-vrp.c:445 (was: Re: gcc-4.1-20050709: ICE in loop_givs_rescan, at loop.c:5517) Dan Kegel
2005-07-11  1:35   ` gcc-4.1-20050709: alpha: "macro requires $at register while noat in effect" while compiling Linux kernel Dan Kegel
2005-07-11  6:58     ` Falk Hueffner [this message]
2005-07-11 12:54       ` Paul Koning
2005-07-11 13:57         ` Dan Kegel
2005-07-11 16:47         ` Richard Henderson
2005-07-11 17:01           ` Dan Kegel
2005-07-11 17:07             ` Richard Henderson
2005-07-11 17:29               ` Dan Kegel
2005-07-11 17:54                 ` Richard Henderson
2005-07-11 16:48       ` Richard Henderson

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=873bql96dl.fsf@debian.org \
    --to=falk@debian.org \
    --cc=dank@kegel.com \
    --cc=gcc@gcc.gnu.org \
    /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).