This revision was automatically updated to reflect the committed changes.
Closed by commit rUNW326250: [libunwind][MIPS]: Add support for unwinding in
N32 processes. (authored by jhb, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D39074?vs=133660=136144#toc
Repository:
sdardis accepted this revision.
sdardis added a comment.
This revision is now accepted and ready to land.
Herald added a subscriber: christof.
LGTM after https://reviews.llvm.org/D43585 lands.
Repository:
rUNW libunwind
https://reviews.llvm.org/D39074
sdardis added a comment.
Yes. Something like LIBUNWIND_TEST_CFLAGS mapping to config.test_cflags, which
libunwind/test/libunwind/test/config.py then appends when building the tests.
Thanks.
Repository:
rUNW libunwind
https://reviews.llvm.org/D39074
bsdjhb added a comment.
Hmmm, I'm a bit lost on the CFLAGS bit. I couldn't find a reference to
LIBOMP_TEST_CFLAGS anywhere in the openmp tree. There is a LIBOMP_CFLAGS that
doesn't appear to be test specific.
To try to find a way to modify the CFLAGS for tests I looked at how
sdardis added a comment.
The only thing this needs now is to get correct testing support. Could you add
support for passing down to the configuration script an additional set of
cflags like compiler-rt and libomp do (as a separate patch)? If you look at
libomp, you'll see LIBOMP_TEST_CFLAGS
bsdjhb updated this revision to Diff 133660.
bsdjhb added a comment.
- Rebase.
- Rework ABI macro checks.
Repository:
rUNW libunwind
https://reviews.llvm.org/D39074
Files:
include/__libunwind_config.h
src/AddressSpace.hpp
src/DwarfInstructions.hpp
src/UnwindRegistersRestore.S
bsdjhb marked 7 inline comments as done.
bsdjhb added a comment.
Nice sleuthing!
Repository:
rUNW libunwind
https://reviews.llvm.org/D39074
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
sdardis added a comment.
Ok, I've found my issue. inttypes.h in libcxx include_next's ,
which on my debian linux systems has the include chain , ,
. "helpfully" provides #defines of the various _ABIXXX
macros, which normally the compiler defines depending on the ABI. The include
chain for
bsdjhb added a comment.
@sdardis Can you confirm if the existing N64 bits work fine for you or if the
tests crash similarly?
https://reviews.llvm.org/D39074
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
bsdjhb added a comment.
After fighting with cmake for a bit, I just broke down and cross-compiled the
tests by hand and then ran them under a qemu system (rather than using qemu
user mode). All of the tests ran fine for me without crashing using GCC 6.3.0
for FreeBSD 12 with N32. Given the
sdardis added a comment.
I just checked both my qemu copy and on my mips64 machine and it seems to be a
a copy / paste error. Reposting here directly from my machines:
MIPS64:
diff --git a/test/libunwind/test/config.py b/test/libunwind/test/config.py
index 2a0c828..a8952c3 100644
---
bsdjhb added a comment.
In https://reviews.llvm.org/D39074#974913, @sdardis wrote:
> This was libunwind's test suite:
>
> Compiled test failed unexpectedly!
>
> Testing Time: 0.53s
>
> Failing Tests (1):
> libunwind ::
sdardis added a comment.
Um, I now appear to be getting different results for running under QEMU doing
it the proper way. I was previously rebuilding the failing test by hand and
running under qemu. I don't believe I changed anything important, I'll have to
take a longer look.
If you define
sdardis added a comment.
This was libunwind's test suite:
Compiled test failed unexpectedly!
Testing Time: 0.53s
Failing Tests (1):
libunwind :: libunwind_02.pass.cpp
Expected Passes: 3
Unexpected Failures: 1
The hacky
bsdjhb added a comment.
To be clear, are you getting the failure running libunwind's test suite or your
own test? I've managed to get libunwind to cross-compile for me using GCC
6.3.0 on FreeBSD for O32, N32, and N64, but only to build the library, not the
tests. I've been running a simple
bsdjhb updated this revision to Diff 129103.
bsdjhb added a comment.
- Rebase after N64 -> newabi commit.
https://reviews.llvm.org/D39074
Files:
include/__libunwind_config.h
src/AddressSpace.hpp
src/DwarfInstructions.hpp
src/UnwindRegistersRestore.S
src/UnwindRegistersSave.S
bsdjhb added a comment.
Ok, I'm definitely fine with splitting the rename out into a separate patch.
Will wait for @sdardis to be sure.
https://reviews.llvm.org/D39074
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
compnerd added a comment.
Looking over this patch again, I think I really would prefer that this was
split up into two patches. The first one should be entirely mechanical,
replacing `n64` with `newabi`. The second patch would actually make the
changes that you are are after. That would
bsdjhb added a comment.
ping @sdardis, @compnerd
https://reviews.llvm.org/D39074
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bsdjhb updated this revision to Diff 126841.
bsdjhb marked an inline comment as done.
bsdjhb added a comment.
- Use __SIZEOF_POINTER__ instead of __LP64__.
- Adjust comment for newabi register class.
https://reviews.llvm.org/D39074
Files:
include/__libunwind_config.h
src/AddressSpace.hpp
bsdjhb marked 2 inline comments as done.
bsdjhb added inline comments.
Comment at: src/AddressSpace.hpp:201
+inline uint64_t LocalAddressSpace::getRegister(pint_t addr) {
+#if defined(__LP64__) || (defined(__mips__) && defined(_ABIN32))
+ return get64(addr);
sdardis added inline comments.
Comment at: include/__libunwind_config.h:73
+# elif defined(_ABIN32) && defined(__mips_soft_float)
+#define _LIBUNWIND_TARGET_MIPS_NEWABI 1
+#define _LIBUNWIND_CONTEXT_SIZE 35
compnerd wrote:
> Minor nit: I prefer either
compnerd added inline comments.
Comment at: include/__libunwind_config.h:73
+# elif defined(_ABIN32) && defined(__mips_soft_float)
+#define _LIBUNWIND_TARGET_MIPS_NEWABI 1
+#define _LIBUNWIND_CONTEXT_SIZE 35
Minor nit: I prefer either `NABI` or
bsdjhb updated this revision to Diff 126620.
bsdjhb added a comment.
- Rebase after O32/N64 commit.
https://reviews.llvm.org/D39074
Files:
include/__libunwind_config.h
src/AddressSpace.hpp
src/DwarfInstructions.hpp
src/Registers.hpp
src/UnwindCursor.hpp
src/UnwindRegistersRestore.S
bsdjhb updated this revision to Diff 120624.
bsdjhb added a comment.
- Rebase after MAX_REGISTER change.
https://reviews.llvm.org/D39074
Files:
include/__libunwind_config.h
src/AddressSpace.hpp
src/DwarfInstructions.hpp
src/Registers.hpp
src/UnwindCursor.hpp
bsdjhb marked 2 inline comments as done.
bsdjhb added inline comments.
Comment at: include/__libunwind_config.h:62
+# define _LIBUNWIND_CONTEXT_SIZE 35
+# define _LIBUNWIND_CURSOR_SIZE 46
+# define _LIBUNWIND_HIGHEST_DWARF_REGISTER 66
sdardis wrote:
>
bsdjhb updated this revision to Diff 120578.
bsdjhb marked 3 inline comments as done.
bsdjhb added a comment.
- Use correct #ifdef for N32.
- Rename N64 to newabi.
https://reviews.llvm.org/D39074
Files:
include/__libunwind_config.h
src/AddressSpace.hpp
src/DwarfInstructions.hpp
sdardis added inline comments.
Comment at: include/__libunwind_config.h:59-68
+# elif defined(__mips__) && defined(_ABIN32) && defined(__mips_soft_float)
+# define _LIBUNWIND_TARGET_MIPS_N64 1
+# define _LIBUNWIND_CONTEXT_SIZE 35
+# define _LIBUNWIND_CURSOR_SIZE 46
+# define
bsdjhb created this revision.
Herald added subscribers: JDevlieghere, arichardson, aprantl.
N32 uses the same register context as N64. However, N32 requires one
change to properly fetch addresses from registers stored in memory.
Since N32 is an ILP32 platform, getP() only fetches the first
29 matches
Mail list logo