1 /* NG4fls.S: SPARC optimized fls and __fls for 2 * 3 * Copyright (c) 2017, Oracle and/or its affil 4 */ 5 6 #include <linux/linkage.h> 7 8 #define LZCNT_O0_G2 \ 9 .word 0x85b002e8 10 11 .text 12 .register %g2, #scratch 13 .register %g3, #scratch 14 15 ENTRY(NG4fls) 16 LZCNT_O0_G2 !lzcnt %o0, %g2 17 mov 64, %g3 18 retl 19 sub %g3, %g2, %o0 20 ENDPROC(NG4fls) 21 22 ENTRY(__NG4fls) 23 brz,pn %o0, 1f 24 LZCNT_O0_G2 !lzcnt %o0, %g2 25 mov 63, %g3 26 sub %g3, %g2, %o0 27 1: 28 retl 29 nop 30 ENDPROC(__NG4fls)
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.