What are the possible pitfalls in porting Psyco to 64-bit?

前端 未结 4 1737
时光取名叫无心
时光取名叫无心 2021-02-14 09:47

The Psyco docs say:

Just for reference, Psyco does not work on any 64-bit systems at all. This fact is worth being noted again, now that the latest

4条回答
  •  独厮守ぢ
    2021-02-14 10:00

    Since psyco is a compiler, it would need to be aware of the underlying assembly language to generate useful code. That would mean it would need to know about the 8 new registers, new opcodes for 64 bit code, etc.

    Furthermore, to interop with the existing code, it would need to use the same calling conventions as 64 bit code. The AMD-64 calling convention is similar to the old fast-call conventions in that some parameters are passed in registers (in the 64 bit case rcx,rdx,r8,r9 for pointers and Xmm0-Xmm3 for floating point) and the rest are pushed onto spill space on the stack. Unlike x86, this extra space is usually allocated once for all of the possible calls. The IA64 conventions and assembly language are different yet.

    So in short, I think this is probably not as simple as it sounds.

提交回复
热议问题