[PATCH] D19920: [libunwind][ARM] Improve unwinder stack usage on baremetal targets - part 1

Asiri Rathnayake via cfe-commits cfe-commits at lists.llvm.org
Wed May 4 07:32:31 PDT 2016


rmaprath created this revision.
rmaprath added a reviewer: jroelofs.
rmaprath added a subscriber: cfe-commits.
Herald added subscribers: rengolin, aemerson.

Currently, `unw_context_t` and `unw_cursor_t` are sized to allow the virtual register set of any target supported by libunwind. This does not work well for baremetal ARM targets (where memory is at a premium).

This patch makes `unw_context_t` and `unw_cursor_t` use just enough space to hold the ARM virtual register set on baremetal arm targets.

The various `Registers_xxx` definitions (and their dependencies) had to be conditionally compiled out in order to allow each of the targets to perform size checks independently.

This change saves about 1500 bytes of stack on ARM v7 (similar amount on AArch32).

http://reviews.llvm.org/D19920

Files:
  include/libunwind.h
  src/CompactUnwinder.hpp
  src/Registers.hpp
  src/UnwindCursor.hpp
  src/libunwind.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19920.56146.patch
Type: text/x-patch
Size: 9361 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160504/433cae70/attachment.bin>


More information about the cfe-commits mailing list