linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH] ARM: Use generic BUG() handler
Date: Tue, 1 Mar 2011 10:03:06 +0000	[thread overview]
Message-ID: <20110301100306.GA18007@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <19820.47240.801312.507393@pilspetsen.it.uu.se>

On Tue, Mar 01, 2011 at 10:12:40AM +0100, Mikael Pettersson wrote:
> Russell King - ARM Linux writes:
>  > On Tue, Mar 01, 2011 at 08:49:49AM +0000, Russell King - ARM Linux wrote:
>  > > On Mon, Feb 28, 2011 at 04:27:43PM -0800, Simon Glass wrote:
>  > > > +	asm volatile("1:\t.word %c3\n"				\
>  > > > +		     ".pushsection __bug_table,\"a\"\n"		\
>  > > > +		     "2:\t.word 1b, %c0\n"			\
>  > > > +		     "\t.hword %c1, 0\n"			\
>  > > > +		     "\t.org 2b+%c2\n"				\
>  > > 
>  > > %c doesn't work on lots of versions of gcc, which is why we can't use
>  > > the generic bug support.  There's no way to reliably generate constants
>  > > without many compiler versions spitting out a '#' before them.
>  > 
>  > gcc 4.3.2:
>  > 
>  > asm(".word %c0" : : "i" (0));
>  > 
>  > produces:
>  > 
>  >         .word #0
>  > 
>  > which gas chokes on:
>  > 
>  > /tmp/cc2hGOHd.s:12: Error: bad expression
>  > /tmp/cc2hGOHd.s:12: Error: junk at end of line, first unrecognized character is `0'
>  > 
>  > So what this means is that it's impossible to generate constants in
>  > assembly with GCC targetting ARM without having them prefixed by '#',
>  > which in turn makes it impossible to use the generic BUG support.
>  > 
>  > I reported this bug to gcc folk many years ago.  I've no idea which
>  > version it has been fixed in or if it's even been fixed.
> 
> What's the gcc bugzilla bug number?

No idea off hand - I'll have to search for that.

  reply	other threads:[~2011-03-01 10:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-01  0:27 [RFC PATCH] ARM: Use generic BUG() handler Simon Glass
2011-03-01  8:49 ` Russell King - ARM Linux
2011-03-01  8:59   ` Russell King - ARM Linux
2011-03-01  9:12     ` Mikael Pettersson
2011-03-01 10:03       ` Russell King - ARM Linux [this message]
2011-03-01 16:34         ` Simon Glass
2011-03-01 20:28           ` Russell King - ARM Linux
2011-03-02 10:59           ` Dave Martin
2011-03-03 14:11             ` Russell King - ARM Linux
2011-03-03 14:44               ` Dave Martin
2011-03-01 17:48 ` Dave Martin
2011-03-01 20:32 ` Russell King - ARM Linux

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=20110301100306.GA18007@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.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 NNTP newsgroup(s).