i386-x40 refactoring