hooks: add a warning to detect unimplemented hooks
[smatch.git] / validation / asm-goto-labels.c
blob85e1b61b42a962b7c28fd760d7a98844ef691fd4
1 static inline int __static_cpu_has(unsigned char bit)
3 asm goto("1: jmp %l[t_no]\n"
4 "2:\n"
5 ".section .altinstructions,\"a\"\n"
6 "\n"
7 "1b\n"
8 "0\n" /* no replacement */
9 " .byte %P0\n" /* feature bit */
10 " .byte 2b - 1b\n" /* source len */
11 " .byte 0\n" /* replacement len */
12 " .byte 0xff + 0 - (2b-1b)\n" /* padding */
13 ".previous\n"
14 : : "i" (bit) : : t_no, ble);
15 return 1;
16 t_no:
17 return 0;
21 * check-name: Asm with goto labels.