Move x86 code generator to separate file