bsdjhb updated this revision to Diff 117438.
bsdjhb added a comment.
- Fixes from review feedback.
https://reviews.llvm.org/D38110
Files:
include/__libunwind_config.h
include/libunwind.h
src/Registers.hpp
src/UnwindCursor.hpp
src/UnwindRegistersRestore.S
src/UnwindRegistersSave.S
bsdjhb marked 14 inline comments as done.
bsdjhb added a comment.
I have only tested this (test programs as mentioned earlier) with clang 5.0.0
(with a few patches) on o32 and n64. I am in the process of performing the
same tests with GCC 6.3.0. I will also spend some time figuring out how to
bsdjhb added a comment.
FYI, I was able to do simple testing (C++ programs throwing exceptions) using
GCC 6.3 to compile a FreeBSD userland for both O32 and N64. Still working on
cross-compiling LLVM so I can run the tests under qemu.
https://reviews.llvm.org/D38110
___
bsdjhb added a comment.
I keep running into issues trying to cross-build LLVM (it keeps wanting to use
/usr/bin/cc or host libraries even though cross-compiling is enabled). I
wonder if the failures you saw Simon might be due to
https://bugs.llvm.org/show_bug.cgi?id=33858? Could you try apply
bsdjhb updated this revision to Diff 118638.
bsdjhb added a comment.
- Add more soft-float checks.
https://reviews.llvm.org/D38110
Files:
include/__libunwind_config.h
include/libunwind.h
src/Registers.hpp
src/UnwindCursor.hpp
src/UnwindRegistersRestore.S
src/UnwindRegistersSave.S
bsdjhb updated this revision to Diff 118960.
bsdjhb added a comment.
- Check _ABI* rather than _MIPS_SIM.
- Save and restore lo/hi.
- Expand FIXME comment for more missing registers.
- Return UNW_SUCCESS from unw_getcontext().
- Use correct DWARF numbers for hi and lo and put hi first.
- Bump high
bsdjhb added a comment.
FreeBSD/i386 also uses llvm libunwind by default.
https://reviews.llvm.org/D38900
___
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 119245.
bsdjhb added a comment.
- Save all of the general purpose registers.
https://reviews.llvm.org/D38110
Files:
include/__libunwind_config.h
include/libunwind.h
src/Registers.hpp
src/UnwindCursor.hpp
src/UnwindRegistersRestore.S
src/UnwindReg
bsdjhb marked 2 inline comments as done.
bsdjhb added inline comments.
Comment at: src/UnwindRegistersSave.S:100
+#
+DEFINE_LIBUNWIND_FUNCTION(unw_getcontext)
+ .set push
sdardis wrote:
> After looking at another implementation of libunwind and the other platfor
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 32-bit
bsdjhb marked an inline comment as done.
bsdjhb added a comment.
Ping?
https://reviews.llvm.org/D38110
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bsdjhb created this revision.
Herald added subscribers: krytarowski, arichardson, sdardis, emaste.
FreeBSD N64 MIPS systems can include 32-bit libraries for O32 in
/usr/lib32 similar to the 32-bit compatibility libraries provided
for FreeBSD/amd64 and FreeBSD/powerpc64.
Repository:
rC Clang
h
bsdjhb updated this revision to Diff 10.
bsdjhb added a comment.
- Add a test case.
Repository:
rC Clang
https://reviews.llvm.org/D42972
Files:
lib/Driver/ToolChains/FreeBSD.cpp
test/Driver/freebsd.c
Index: test/Driver/freebsd.c
=
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
src/U
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
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe
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
LIBUNWIND_BUILD
bsdjhb created this revision.
bsdjhb added a reviewer: sdardis.
Herald added subscribers: christof, mgorny.
This is done via a new LIBUNWIND_TEST_CFLAGS variable.
Repository:
rUNW libunwind
https://reviews.llvm.org/D43585
Files:
CMakeLists.txt
test/lit.site.cfg.in
Index: test/lit.site.
bsdjhb updated this revision to Diff 135285.
bsdjhb added a comment.
- Unexpand tabs.
Repository:
rUNW libunwind
https://reviews.llvm.org/D43585
Files:
CMakeLists.txt
test/lit.site.cfg.in
Index: test/lit.site.cfg.in
===
--
bsdjhb added a comment.
@sdardis requested this functionality in the review of
https://reviews.llvm.org/D39074. Simon, can you confirm that this works for
you in your testing?
Repository:
rUNW libunwind
https://reviews.llvm.org/D43585
___
cfe-
bsdjhb created this revision.
bsdjhb added a reviewer: sdardis.
Herald added subscribers: cfe-commits, christof.
Currently this is only planned to be used by libunwind's tests.
Repository:
rCXX libc++
https://reviews.llvm.org/D43584
Files:
utils/libcxx/test/config.py
Index: utils/libcxx/
bsdjhb abandoned this revision.
bsdjhb added a comment.
Obsoleted by https://reviews.llvm.org/rCXX325914.
Repository:
rCXX libc++
https://reviews.llvm.org/D43584
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bi
bsdjhb marked 2 inline comments as done.
bsdjhb added a comment.
My only question is if this should be named LIBUNWIND_TEST_COMPILER_FLAGS to
match the name used in libc++?
Repository:
rUNW libunwind
https://reviews.llvm.org/D43585
___
cfe-commi
bsdjhb updated this revision to Diff 135714.
bsdjhb added a comment.
- Use STRING instead of PATH.
- Update for committed libcxx change.
Repository:
rUNW libunwind
https://reviews.llvm.org/D43585
Files:
CMakeLists.txt
test/lit.site.cfg.in
Index: test/lit.site.cfg.in
===
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 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
http://lists.llvm.org/c
bsdjhb created this revision.
bsdjhb added reviewers: compnerd, sdardis.
Herald added a subscriber: arichardson.
This is in preparation for adding support for N32 unwinding which reuses
the newabi register class.
https://reviews.llvm.org/D41842
Files:
include/__libunwind_config.h
src/Regist
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
src/lib
bsdjhb updated this revision to Diff 136098.
bsdjhb added a comment.
- Match names used in libcxx and add LINKER_FLAGS.
Repository:
rUNW libunwind
https://reviews.llvm.org/D43585
Files:
CMakeLists.txt
test/lit.site.cfg.in
Index: test/lit.site.cfg.in
bsdjhb added a comment.
After thinking about this some more, I need to rework this a bit. The choice
of how to expose the floating point registers via getFloatingPointRegister /
setFloatingPointRegister only affects consumers of the libunwind
unw_get_fpreg/unw_set_fpreg. I think a bigger fact
bsdjhb added a comment.
Hmmm, so I was somewhat mistaken as DwarfInstructions.hpp::stepWithDwarf() does
use the Register class's setFloatRegister(), however, it assumes that the
floating point register is always a double
(DwarfInstructions.hpp::getSavedFloatRegister() uses AddressSpace::getDoub
bsdjhb updated this revision to Diff 136164.
bsdjhb added a comment.
Herald added a subscriber: christof.
- Rebase after N32 commit.
- Use ldc1/sdc1 rather than l.d and s.d.
Repository:
rUNW libunwind
https://reviews.llvm.org/D41968
Files:
include/__libunwind_config.h
include/libunwind.h
bsdjhb updated this revision to Diff 137085.
bsdjhb added a comment.
- Add a comment about using a single FP layout for O32.
- Treat 32-bit floating point registers on O32 as plain registers.
Repository:
rUNW libunwind
https://reviews.llvm.org/D41968
Files:
include/__libunwind_config.h
i
bsdjhb marked 2 inline comments as done.
bsdjhb added a comment.
This version follows the suggestion I made earlier of treating 32-bit floating
point registers as a "plain" register for O32 rather than a floating-point
register. It seems to work for me though for O32 I've only tested with 32-bi
bsdjhb added a comment.
@sdardis ping. I think the approach I've used for O32 is probably the right
one in that it matches what DWARF expects (DWARF doesn't treat the 32-bit
floating point registers as pairs but as individual registers). I think the
question is if I O32 with 32-bit FP registe
bsdjhb created this revision.
bsdjhb added a reviewer: dim.
Herald added subscribers: atanasyan, krytarowski, arichardson.
FreeBSD defaults to mips3 for all MIPS ABIs with GCC as that is the
minimum MIPS architecture FreeBSD supports. Use mips3 for MIPS64 and
mips2 for MIPS32 to match.
Reposito
bsdjhb created this revision.
bsdjhb added a reviewer: dim.
Herald added subscribers: atanasyan, krytarowski, arichardson, sdardis.
FreeBSD's mips64 builds O32 binaries for /usr/lib32 by default and
thus needs to be able to link O32 binaries which requires an explicit
linker emulation. Go ahead a
bsdjhb added a comment.
FWIW, I ended up fixing FreeBSD to only use in freestanding
environments and always use in userland which makes this patch no
longer necessary. (Only one place needed to be fixed.)
Repository:
rC Clang
https://reviews.llvm.org/D44604
___
bsdjhb added inline comments.
Comment at: lib/Driver/ToolChains/FreeBSD.cpp:197
+CmdArgs.push_back("-m");
+CmdArgs.push_back("elf64ltsmip_fbsd");
+break;
atanasyan wrote:
> Does it make a sense to handle N32 ABI case here?
For whatever reason, FreeBSD
bsdjhb updated this revision to Diff 152955.
bsdjhb added a comment.
- Add N32EL.
Repository:
rC Clang
https://reviews.llvm.org/D48507
Files:
lib/Driver/ToolChains/FreeBSD.cpp
test/Driver/freebsd.c
Index: test/Driver/freebsd.c
===
bsdjhb added a comment.
Ping. I'd like this to go in and get merged into FreeBSD's clang so we can
test this for a few months before 12.0 branches.
https://reviews.llvm.org/D24867
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://list
bsdjhb added a comment.
FWIW, for FreeBSD I defined __CLANG_MAX_ALIGN_T and _GCC_MAX_ALIGN_T in
FreeBSD's when defining the typedef to handle this.
Repository:
rL LLVM
https://reviews.llvm.org/D47814
___
cfe-commits mailing list
cfe-commits@lis
bsdjhb created this revision.
bsdjhb added a reviewer: arichardson.
Herald added subscribers: atanasyan, krytarowski, sdardis, emaste.
Use getTriple.isMIPS64() to detect 64-bit MIPS ABIs in
FreeBSD::getSupportedSanitizers() instead of getTriple.isMIPS32().
Repository:
rC Clang
https://reviews
bsdjhb added a comment.
AFAICT, I don't see a way to ask clang "which sanitizers are supported by this
target". Hmm, the CHECK-SANL-MIPS test in tests/Driver/fsanitize.c seems like
the closest match.
Repository:
rC Clang
https://reviews.llvm.org/D49143
__
bsdjhb updated this revision to Diff 154840.
bsdjhb added a comment.
Add tests.
Repository:
rC Clang
https://reviews.llvm.org/D49143
Files:
lib/Driver/ToolChains/FreeBSD.cpp
test/Driver/fsanitize.c
Index: test/Driver/fsanitize.c
=
bsdjhb added a comment.
Ping @compnerd, @sdardis
https://reviews.llvm.org/D38110
___
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 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 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);
com
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 added a comment.
Ping @sdardis @compnerd
Repository:
rUNW libunwind
https://reviews.llvm.org/D41968
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bsdjhb added a comment.
I think one source of truth is better than two. I do find the constant's value
a bit off in general though. That is, the name 'HIGHEST' implies to me that it
is the highest value used, not N + 1 as we currently define it.
https://reviews.llvm.org/D39281
___
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
src/Regi
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:
> Shouldn'
bsdjhb updated this revision to Diff 120623.
bsdjhb added a comment.
- Rebase for recent change to MAX_REGISTER meaning.
https://reviews.llvm.org/D38110
Files:
include/__libunwind_config.h
include/libunwind.h
src/Registers.hpp
src/UnwindCursor.hpp
src/UnwindRegistersRestore.S
src/Un
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
src/UnwindRegistersResto
bsdjhb updated this revision to Diff 120798.
bsdjhb marked an inline comment as done.
bsdjhb added a comment.
- Rebase on more MAX_REGISTER changes.
- Use macro for lastDwarfRegisterNumber.
- Move MIPS ABI constants under a single #ifdef __mips__.
https://reviews.llvm.org/D38110
Files:
includ
bsdjhb added a comment.
In https://reviews.llvm.org/D38110#910526, @mstorsjo wrote:
> Just a heads up WRT this patch; we're discussing changing the size of
> `unw_word_t` to match `uintptr_t` in https://reviews.llvm.org/D39365. Does
> that break anything for your case? It shouldn't affect what'
bsdjhb updated this revision to Diff 121396.
bsdjhb added a comment.
- Rebase.
- Update O32 cursor size after unw_word_t change.
https://reviews.llvm.org/D38110
Files:
include/__libunwind_config.h
include/libunwind.h
src/Registers.hpp
src/UnwindCursor.hpp
src/UnwindRegistersRestore.S
bsdjhb added a comment.
Ping
https://reviews.llvm.org/D38110
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bsdjhb created this revision.
bsdjhb added a reviewer: sdardis.
Herald added a subscriber: arichardson.
For newabi this is fairly simple as we just save/restore the 32
floating-point registers as doubles. For O32 MIPS provides a variety
of floating-point ABIs. For O32 MIPS with 64-bit floating-p
bsdjhb added inline comments.
Comment at: src/Registers.hpp:2659
+ uint32_t _padding;
+ double _floats[32];
+#endif
I chose to always use double here to avoid having different context sizes for
the 32-bit vs 64-bit FPR cases.
https://reviews.llvm.org/D41968
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 C+
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 :: libunwind_02.pass.cp
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 sa
bsdjhb added a comment.
My only question is if we want an OS version check as the FreeBSD driver does
now for libc++ vs libstdc++? FreeBSD started using libcompiler_rt for
libgcc.a in 9.0.
Repository:
rC Clang
https://reviews.llvm.org/D42310
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
http://lists.llvm.org/cgi-bin/mail
65 matches
Mail list logo