x86 module: merge the same functions in module_32.c and module_64.c