| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
Remove the use of undefined behaviour in the c preprocessor by always defining
the value according to the state that was being checked. NFC.
llvm-svn: 266916
|
|
|
|
|
|
|
|
|
|
|
|
| |
This follows the pattern in the Apple clause duplicating a tuple of definitions.
However, it will define them to a value rather than a defined check to remove
the `-Wexpansion-to-defined` warning (which may be treated as an error).
This also opens the door to unifying the two code paths into one.
NFC.
llvm-svn: 266915
|
|
|
|
|
|
|
|
| |
Join the two paths for this macro. At the end of the day, the difference was
that MIPS and ARM on Apple have different behaviour. This is a setup change to
remove an instance of -Wexpansion-to-defined. NFC.
llvm-svn: 266913
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use x29 and x30 for fp and lr respectively.
This does not change the code generation with integrated asm
but using x30 and x29 helps compile the code with gnu as. Currently gas
fails to assemble this code with errors as below.
Error: operand X should be an integer register.
Newer versions of binutils should be fixed, but enough exists in the wild
to make this change harmless and worthy.
Patch by Khem Raj.
llvm-svn: 260595
|
|
|
|
|
|
| |
Current FreeBSD and NetBSD code is compatible.
llvm-svn: 260001
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch allows to use libunwind on bare-metal systems that do not
include malloc/free by conditionally turning off nonessential
functionality that requires these functions.
The disabled functionality includes:
* the .cfi_remember_state and .cfi_restore_state instructions;
* the DWARF FDE cache.
The .cfi_{remember,restore}_state instructions don't seem to be used
by contemporary compilers. None of the LLVM backends emit it.
The DWARF FDE cache is bypassed if _LIBUNWIND_NO_HEAP is defined.
Specifically, entries are never added to it, so the search begins
and ends at the statically allocated, empty initial cache.
Such heap-less libunwind on a bare metal system is successfully used
in the ARTIQ project[1], and it is my hope that it will be useful
elsewhere.
[1]: http://m-labs.hk/artiq
Differential Revision: http://reviews.llvm.org/D11897
llvm-svn: 252452
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D13820
llvm-svn: 250541
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Currently, libunwind doesn't support MIPS. However, with this patch
we do allow the library to build, and we warn the user about the lack of
support for MIPS. Also, the dummy unw_getcontext() implementation for MIPS just
traps on function entry in order to avoid any confusion with silent/weird
failures at runtime.
This allows us to test an LLVM-based toolchain without the dependency on a
GCC toolchain. Of course, C++ exception handling and other things that depend
on stack unwinding will not work until we add a proper implementation of the
stub functions.
Reviewers: compnerd, logan
Subscribers: dsanders, llvm-commits
Differential Revision: http://reviews.llvm.org/D13160
llvm-svn: 248673
|
|
|
|
|
|
| |
Cleanup a number of `-Wunused-parameter` warnings. NFC.
llvm-svn: 246528
|
|
|
|
|
|
|
|
|
| |
This patch makes no assumptions on ABI past the ABI defined in
the OpenRISC 1000 spec except that the DWARF register numbers will
be 0-31 for registers r0-r31, which is true for both gcc and
clang at the moment.
llvm-svn: 246413
|
|
|
|
| |
llvm-svn: 246143
|
|
|
|
|
|
|
|
| |
Fix out-of-bounds array access when setting arm float registers.
Patch by Leandro GraciĆ” Gil!
llvm-svn: 245665
|
|
|
|
|
|
|
|
|
|
| |
Use the canonical __aarch64__ predefined macro for 64-bit ARM. Apple-
specific cases are left as __arm64__. Also add an #error for unsupported
architectures to catch this sort of case in the future.
Differential Revision: http://reviews.llvm.org/D12005
llvm-svn: 244893
|
|
|
|
|
|
|
| |
I encountered this on FreeBSD/arm64, and then found the same issue was
reported by Daniil Troshkov.
llvm-svn: 244892
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The register save routine in libunwind was using write-back addressing
mode to r0 for thumb, when that was not only different from the ARM
version and more importantly the register restore, but also saving the
wrong address.
Patch by Manuel Freiberger.
Fixes PR24331.
llvm-svn: 244237
|
|
|
|
|
|
|
| |
GCC doesn't seems to like having the attribute before extern, but
Clang accepts it either way. This patch makes it compile on both.
llvm-svn: 243147
|
|
|
|
|
|
|
|
|
|
|
|
| |
To build libc++abi without libunwind, we should make sure that all
function calls to _Unwind_{Get,Set}{GR,IP}() are inlined as function
calls to _Unwind_VRS_{Get,Set}(). Otherwise, libc++abi.so will fail to
link since libgcc does not provide these symbol at all.
This commit fixes the problem by providing both the inlined version and
exported version.
llvm-svn: 243073
|
|
|
|
|
|
|
| |
Introduce __libunwind_config.h to avoid cross repository circular
dependency with libcxxabi.
llvm-svn: 242642
|
|
|
|
|
|
|
|
| |
unw_getcontext() should return UNW_ESUCCESS on success. Therefore, the
assembly for AArch64 is incorrect because "ldr x0, #0" is a PC-relative
load instead of an immediate value load.
llvm-svn: 240648
|
|
|
|
|
|
|
| |
To compile libunwind with gcc/g++ 4.9, it is required to avoid the
for-declaration statement from C99.
llvm-svn: 240609
|
|
|
|
| |
llvm-svn: 238656
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit fixes the unw_step() for ARM EHABI. However, this commit
also changes the implementation details for ARM EHABI.
The first change is that the personality function should call
__gnu_unwind_frame() for default (or de facto) frame unwinding based on
the ARM-defined unwind opcode. The function __gnu_unwind_frame() will
in turn calls unw_step() which actually unwinds the frame.
The second change is that the implementation _Unwind_Backtrace() should
no longer calls unw_step() to unwind the frame; since according to ARM
EHABI, the personality function should unwind the frame for us.
Special thanks to Anton for helpful suggestion on the initial version of
this patch.
llvm-svn: 238560
|
|
|
|
|
|
|
|
| |
Include algorithm early as otherwise you get a number of particularly unhelpful
messages about failed static assertions. This fixes compilation on Linux with
gcc.
llvm-svn: 237002
|
|
|
|
|
|
| |
Differential Revision: http://reviews.llvm.org/D9272
llvm-svn: 236585
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We currently only include <link.h> on CloudABI and Linux. We can enable
it on FreeBSD as well, as it also supports the dl_iterate_phdr()
function that's provided by <link.h>.
FreeBSD, however, does not provide the ElfW() macro. Instead, the
host-specific ELF datastructures are named just Elf_XXX in addition to
the host-independent Elf32_XXX and Elf64_XXX types.
Differential Revision: http://reviews.llvm.org/D8169
Approved by: emaste
llvm-svn: 236154
|
|
|
|
|
|
|
|
|
|
| |
This include is not currently used. It is intended for type info based
switching, which is part of the EHABI specification. However, the unwinder does
not currently support this functionality. This backwards dependency into
libc++abi is currently causing a buildbot failure, remove it until we have a
better solution.
llvm-svn: 235893
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now thta the build is split, clean up some of the warnings in the build:
cc1: warning: command line option '-nostdinc++' is valid for C++/ObjC++ but not for C
cc1: warning: command line option '-fno-rtti' is valid for C++/ObjC++ but not for C
Append the C++ specific flags specifically to the C++ sources. Avoids the
spurious warnings due to invalid flags being passed during the compilation of
C++ sources.
llvm-svn: 235797
|
|
|
|
|
|
|
| |
This replicates most of the build infrastructure from libc++abi ported to
libunwind. This allows building libunwind without requiring libc++abi.
llvm-svn: 235795
|
|
This moves the majority of the unwind sources into the new project layout for
libunwind. This was previously discussed on llvmdev at [1]. This is a
purely movement related change, with the build infrastructure currently still
residing in the libc++abi repository.
[1] http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-January/081507.html
llvm-svn: 235758
|