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

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

 



On 06/18/2010 02:35 AM, Christopher Li wrote:
> On Fri, Jun 11, 2010 at 1:21 PM, Christopher Li <sparse@xxxxxxxxxxx> wrote:
>>> 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;
>>> }
>>>
> 
> Hi, I update the chrisl branch with your change and the test case.
> 
> Please verify it. I hope I did not do some thing stupid there.

Where can I find it?

> It just hit me, is "asm volatile goto" or "asm goto volatile" valid?
> If so, the asm goto code needs some change.

Holy crap, in docco, there is nothing like that, but I checked gcc
parser sources to be sure, and there indeed is:
     asm type-qualifier[opt] ( asm-argument ) ;
     asm type-qualifier[opt] goto ( asm-goto-argument ) ;
So yes, asm volatile goto is valid. Would you take care of that?

-- 
js
suse labs
--
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