What's the advantage of having nonvolatile registers in a calling convention?

后端 未结 3 1482
粉色の甜心
粉色の甜心 2021-01-15 15:36

I\'m programming a JIT compiler and I\'ve been surprised to discover that so many of the x86-64 registers are nonvolatile (callee-preserved) in the Win64 calling convention.

3条回答
  •  情深已故
    2021-01-15 16:27

    The advantage of having nonvolatile registers is: performance.

    The less data is moved, the more efficient a CPU is.

    The more volatile registers, the more energy does the CPU need.

提交回复
热议问题