aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/asm-goto-lables.c
blob: ac2bf2ad1bd8c5354cdc664410ef0a8b60128ecc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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;
}
/*
 *  check-name: Asm with goto labels.
 */