[PATCH 4/4] ARM: add jump label support

Rabin Vincent rabin at rab.in
Mon Nov 28 12:04:15 EST 2011


On Wed, Nov 23, 2011 at 23:23, Russell King - ARM Linux
<linux at arm.linux.org.uk> wrote:
> On Wed, Nov 23, 2011 at 08:25:09PM +0530, Rabin Vincent wrote:
>> +cat << "END" | $@ -x c - -c -o /dev/null >/dev/null 2>&1 && echo "y"
>> +int main(void)
>> +{
>> +#ifdef __arm__
>> +     /*
>> +      * Not related to asm goto, but used by jump label
>> +      * and broken on some ARM GCC versions (see GCC Bug 48637).
>> +      */
>> +     static struct { int dummy; int state; } tp;
>> +     asm ("@ %c0" :: "i" (&tp.state));
>> +#endif
>> +
>> +entry:
>> +     asm goto ("" :::: entry);
>> +     return 0;
>> +}
>> +END
>
> Is the presence of asm goto and %c something we want to test together or
> separately?  I suspect it's something we want to do separately.

Why would we want to do it separately?

The only reason I see is because the results of this test are assigned
to a variable called CC_HAVE_ASM_GOTO and that is not an entirely
accurate name (on ARM) after the addition of this test.  If that's the
concern, perhaps this variable could just be renamed?



More information about the linux-arm-kernel mailing list