Re: [PATCH 1/1] parser: add support for asm goto

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 11, 2010 at 8:05 AM, Jiri Slaby <jslaby@xxxxxxx> wrote:
> On 06/10/2010 09:18 PM, Christopher Li wrote:
>> Hi Jirl,
>
> Hi, (the last letter in my name should be small I :))

Ah, sorry about that.

>
> static inline int __static_cpu_has(unsigned char bit)
> {
>        asm goto("1: jmp %l[t_no]\n"
>                 "2:\n"
>                 ".section .altinstructions,\"a\"\n"
>                 "\n"
>                 "1b\n"
>                 "0\n"         /* no replacement */
>                 " .byte %P0\n"         /* feature bit */
>                 " .byte 2b - 1b\n"     /* source len */
>                 " .byte 0\n"           /* replacement len */
>                 " .byte 0xff + 0 - (2b-1b)\n"  /* padding */
>                 ".previous\n"
>                 : : "i" (bit) : : t_no, ble);
>        return 1;
> t_no:
>        return 0;
> }
>

I will add that as test case.

Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux