Improve lib_x86
Add tests