Attached is a new patch, leaving the optimizations unaltered only on i686 and x86_64.