__static_cpu_has(unsigned char bit)1*1f5207b7SJohn Levonstatic inline int __static_cpu_has(unsigned char bit) 2*1f5207b7SJohn Levon { 3*1f5207b7SJohn Levon asm goto("1: jmp %l[t_no]\n" 4*1f5207b7SJohn Levon "2:\n" 5*1f5207b7SJohn Levon ".section .altinstructions,\"a\"\n" 6*1f5207b7SJohn Levon "\n" 7*1f5207b7SJohn Levon "1b\n" 8*1f5207b7SJohn Levon "0\n" /* no replacement */ 9*1f5207b7SJohn Levon " .byte %P0\n" /* feature bit */ 10*1f5207b7SJohn Levon " .byte 2b - 1b\n" /* source len */ 11*1f5207b7SJohn Levon " .byte 0\n" /* replacement len */ 12*1f5207b7SJohn Levon " .byte 0xff + 0 - (2b-1b)\n" /* padding */ 13*1f5207b7SJohn Levon ".previous\n" 14*1f5207b7SJohn Levon : : "i" (bit) : : t_no, ble); 15*1f5207b7SJohn Levon return 1; 16*1f5207b7SJohn Levon t_no: 17*1f5207b7SJohn Levon return 0; 18*1f5207b7SJohn Levon } 19*1f5207b7SJohn Levon /* 20*1f5207b7SJohn Levon * check-name: Asm with goto labels. 21*1f5207b7SJohn Levon */ 22*1f5207b7SJohn Levon 23