1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
# # int ilogb ( double x ); # # returns (int) log2 (fabs(x)) for x!=0 # returns MIN_INT for x==0 # .text .global ilogb .type ilogb,@function ilogb: movl 8(%esp),%eax addl %eax,%eax jz .Lzero shrl $21,%eax subl $1023,%eax ret .Lzero: stc rcrl %eax ret