import corepy.arch.x86_64.platform as x86_env
code = x86_env.InstructionStream()
code.add(x86.mov(code.gp_return, rsp))
proc = x86_env.Processor()
result = proc.execute(code, mode='int')
print(result)
Executing assembler code with python