fix a layering problem by moving the x86 implementation