I looked at the source of various implementations of setjmp and longjmp and noticed that not all processor registers are stored in the jmp_buf structure. After reviewing the AMD64 ABI, I noticed that only saved registers are saved.
I do not understand how the state of a function can be fully resumed when only some of the registers have been saved. Surely the unsaved registers had to be clogged over and over again until I called longjmp later?
Everything works fine, so I definitely donβt understand. I was hoping that someone could shed light on this.
Thanks!
haste source share