Fix reporting of callee saved registers with nongnu libuwind
authorJan Kotas <jkotas@microsoft.com>
Sat, 21 Mar 2015 04:08:31 +0000 (21:08 -0700)
committerJan Kotas <jkotas@microsoft.com>
Sat, 21 Mar 2015 04:08:31 +0000 (21:08 -0700)
commit285f3a582f227b5cf3a942772e7d6aa9155ddda3
tree44a5529c9fcc8fc24415a76394f263960b1da101
parent76446cc68fdad1ea7c8a63df5174f16135c2b83d
Fix reporting of callee saved registers with nongnu libuwind

The callee saved registers were not preserved for GC stackwalk with nongnu
libunwind that does not provide context pointers. Fixed by adding an extra
space to MachState to preserve them.

To avoid large amounts of copy&pasted code, introduced macro to enumerate
all callee saved registers, similar to existing macro to enumerate all
argument registers. This macro makes the code to copy the register values
between different structures more compact, and less prone to typos.
src/vm/amd64/AsmHelpers.asm
src/vm/amd64/asmconstants.h
src/vm/amd64/cgenamd64.cpp
src/vm/amd64/cgencpu.h
src/vm/amd64/getstate.S
src/vm/amd64/getstate.asm
src/vm/amd64/gmsamd64.cpp
src/vm/amd64/gmscpu.h
src/vm/amd64/unixasmhelpers.S
src/vm/gcinfodecoder.cpp