Vijay Kumar | 70cbec0 | 2017-10-11 12:50:04 -0600 | [diff] [blame^] | 1 | /* NG4fls.S: SPARC optimized fls and __fls for T4 and above. |
2 | * | ||||
3 | * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. | ||||
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) |