📄 bitsasm.cc
字号:
#include "bitsasm.h"#include "fxttypes.h"#if defined BITS_USE_ASM // use x86 ASM asm code#warning 'FYI: using x86-asm for various bit operations'#if defined BITS_USE_ASM // use x86 asm code#if defined BITS__ASM_USE_INLINE#warning 'FYI: using inline asm templates'#else // BITS__ASM_USE_INLINE#warning 'FYI: using asm'#error 'defunct'voidasm_bsf(ulong *x){ asm("movl 4 (%esp), %eaxmovl (%eax), %edx//jnz .LABEL1//movl 0xffffffff, %edx//.LABEL1:bsf %edx, %edxmovl %edx, (%eax)");}//------------------------voidasm_bsr(ulong *x){ asm("movl 4 (%esp), %eaxmovl (%eax), %edx//jnz .LABEL2//movl 0xffffffff, %edx//.LABEL2:bsr %edx, %edxmovl %edx, (%eax)");}//------------------------#endif // BITS__ASM_USE_INLINE#endif // BITS_USE_ASM#endif // BITS_USE_ASM
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -