[Sparc] Add Sparc V8 support
authorDaniel Cederman <cederman@gaisler.com>
Mon, 14 Jan 2019 10:15:20 +0000 (10:15 +0000)
committerDaniel Cederman <cederman@gaisler.com>
Mon, 14 Jan 2019 10:15:20 +0000 (10:15 +0000)
commit17121adfa607b1d70300e88925767626333cf730
treee555a3a8029fc6c577db9f5c04387ffc99051b37
parent5c1768fc57c9eeeee8eb7d76d708a0e3c35c1be1
[Sparc] Add Sparc V8 support

Summary:
Adds the register class implementation for Sparc.
Adds support for DW_CFA_GNU_window_save.
Adds save and restore context functionality.

Adds getArch() function to each Registers_ class to be able to separate
between DW_CFA_AARCH64_negate_ra_state and DW_CFA_GNU_window_save which
are both represented by the same constant.

On Sparc the return address is the address of the call instruction, so
an offset needs to be added when returning to skip the call instruction
and its delay slot. If the function returns a struct it is also necessary
to skip one extra instruction on Sparc V8.

Reviewers: jyknight, mclow.lists, mstorsjo, compnerd

Reviewed By: jyknight, compnerd

Subscribers: jgorbe, mgorny, christof, llvm-commits, fedor.sergeev, JDevlieghere, ldionne, libcxx-commits

Differential Revision: https://reviews.llvm.org/D55763

llvm-svn: 351044
libunwind/include/__libunwind_config.h
libunwind/include/libunwind.h
libunwind/src/DwarfInstructions.hpp
libunwind/src/DwarfParser.hpp
libunwind/src/Registers.hpp
libunwind/src/UnwindCursor.hpp
libunwind/src/UnwindRegistersRestore.S
libunwind/src/UnwindRegistersSave.S
libunwind/src/assembly.h
libunwind/src/libunwind.cpp