fix asm_switch_context() for the x86 and x86_64 archs