Re: Internal unwinding clobbers non-volatile registers.

  • From: Mike Pall <mikelj-2105@xxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Mon, 31 May 2021 05:22:05 +0200

Can Boluk wrote:

I've noticed that internal unwinding [...]

As you can see this will clobber r13-r15 which are defined as callee saved
under MS ABI.

Precisely for this reason, external unwinding is mandatory on
Windows/x64. A previous version of lj_err.c had this text:

| EXT is mandatory on WIN64 since the calling convention has an abundance
| of callee-saved registers (rbx, rbp, rsi, rdi, r12-r15, xmm6-xmm15).

--Mike

Other related posts: