[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070725.123501.71119586.davem@davemloft.net>
Date: Wed, 25 Jul 2007 12:35:01 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: jeremy@...p.org
Cc: viro@....linux.org.uk, torvalds@...ux-foundation.org,
hpa@...or.com, kaos@....com.au, xyzzy@...akeasy.org,
linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org
Subject: Re: [PATCH][RFC] getting rid of stupid loop in BUG()
From: Jeremy Fitzhardinge <jeremy@...p.org>
Date: Wed, 25 Jul 2007 10:36:49 -0700
> I tried that, but there's still no way of getting a pointer to the ud2a
> instruction in there. gcc just generates garbage if you try to use use
> the &&label syntax on a label which isn't (potentially) the target of a
> goto (it just gets placed somewhere random).
>
> But there's a bigger problem than that. If the BUG is in code which can
> be replicated (ie inlined or unrolled), then it would also require
> replicating the static variable...
Another issue is that if you have a conditional trap instruction on
your cpu, and you try the __label__ trick, GCC no longer converts:
BUG_ON(test)
into just a:
set condition codes;
conditional_trap;
sequence because the "stuff" inside the basic block is something
more than just the __builtin_trap().
The holy grail would be being able to get the perfect conditional
trap sequence, plus the annotations in a seperate section.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists