merge the x86 port to master branch