These registers are only available on a limited set of ARM targets (those based on XScale). Other targets should not have to pay the cost of these.
This patch shaves off about ~300 bytes of stack usage and ~1KB of code-size.
Paths
| Differential D21991
[libunwind][ARM] Improve unwinder stack usage - Make WMMX support optional ClosedPublic Authored by rmaprath on Jul 5 2016, 5:44 AM.
Details
Summary These registers are only available on a limited set of ARM targets (those based on XScale). Other targets should not have to pay the cost of these. This patch shaves off about ~300 bytes of stack usage and ~1KB of code-size.
Diff Detail
Event Timeline
Comment Actions I don't think that clang nor LLVM have much in terms of support for XScale. Can we do something more convoluted perhaps? I like the preprocessor based approach. However, if the compiler doesn't define it with the correct target, we define it and push it into the CPPFLAGS. This way, in the future, we can rely on the compiler to do the right thing and eventually lose the cmake magic. Comment Actions
Sounds good to me. Just to confirm, we keep the cmake option and make it define __ARM_WMMX instead of _LIBUNWIND_ARM_WMMX? Or did you mean we try to figure it out based on the target? I think the latter would be very complicated; WMMX is not an architectural feature but an extension supported on some processors (like the PXA series: http://www.marvell.com/application-processors/pxa-family/). WDYT? Thanks. / Asiri Comment Actions Right, we make it a cmake define corresponding to the AEABI name. In the future when clang knows to correctly emit the macro, we just rely on that. Figuring it out based on the target in my case means: ${CMAKE_C_COMPILER} -x c -E - -dM <<< "__ARM_WMMX". Thats not too terrible to do, but since the support for WMMX is rare, I think skimping on that bit of preparation is acceptable too. Comment Actions
This revision is now accepted and ready to land.Jul 6 2016, 8:16 PM
Closed by commit rL274744: [libunwind][ARM] Improve unwinder stack usage - Make WMMX support optional (authored by asiri). · Explain WhyJul 7 2016, 4:03 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 63049 libunwind/trunk/CMakeLists.txt
libunwind/trunk/include/__libunwind_config.h
libunwind/trunk/src/Registers.hpp
libunwind/trunk/src/Unwind-EHABI.cpp
libunwind/trunk/src/UnwindRegistersRestore.S
libunwind/trunk/src/UnwindRegistersSave.S
|