lkml.org 
[lkml]   [2010]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 02/13] jump label v9: base patch
    From
    Date
    On Wed, 2010-06-09 at 17:38 -0400, Jason Baron wrote:

    > +#define DEFINE_JUMP_LABEL(name) \
    > + const char __jlstrtab_##name[] \
    > + __used __attribute__((section("__jump_strings"))) = #name;

    > +#define JUMP_LABEL(tag, label, cond) \
    > +do { \
    > + if (unlikely(cond)) \
    > + goto label; \
    > +} while (0)

    > +#define JUMP_LABEL(tag, label, cond) \
    > + do { \
    > + extern const char __jlstrtab_##tag[]; \
    > + asm goto("1:" \
    > + JUMP_LABEL_NOP \
    > + ".pushsection __jump_table, \"a\" \n\t"\
    > + _ASM_PTR "1b, %l[" #label "], %c0 \n\t" \
    > + ".popsection \n\t" \
    > + : : "i" (__jlstrtab_##tag) : : label);\
    > + } while (0)


    s/tag/name/ ?


    \
     
     \ /
      Last update: 2010-06-10 14:21    [W:0.019 / U:1.804 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site