- User Since
- Jul 25 2016, 12:54 PM (64 w, 4 h)
FWIW, I've got code elsewhere that detects lld-link, that looks like this:
Wrap up all the sets and logic for deciding what symbols to export into a class.
Instead of trying to emulate the pthread rwlocks api with windows implementations, add a RWMutex class (with an interface similar to SmartRWMutex from LLVM) with inline implementations, which can either be no-ops (for no-threads configurations), implemented with SRW locks for windows or pthreads.
Use __SIZEOF_POINTER__ instead of checking __LP64__ together with _WIN64. Changed _WIN32 into _WIN64 within the assembly sources for consistency/clarity. Removed one type definition ifdef by just using (u)intptr_t instead.
Sat, Oct 14
Seems ok to me, with whatever other architectures it's verified on as well.
Thu, Oct 12
This one can be abandoned now.
Wed, Oct 11
As further explanation/justification - libcxxabi and libunwind don't support SEH exceptions yet.
Constructing the exclude string sets directly instead of doing string transformations.
Added more comments about this being mingw specific, changed to use a StringSet instead of a sorted vector.
@mgrang, did you ever get to completing this? I've got a need for this now (only __dmb so far), and if you don't have time, I can try to finish it.
Print DATA in the output def for data symbols, adjusted the stdcall decoration for DllEntryPoint.
Changed the exclude list as suggested by Zachary (write all entries in fully decorated form and just substr the others), moved it to a separate function and using std::sort and std::binary_search instead of making a set of it. Added a comment and changed a condition into an early return, as suggested by Rui.
Tue, Oct 10
Are there any further comments on this, or can someone of those who commented on it before approve it?
Thanks for the review - one inline response to a comment, will do the other suggested changes tomorrow.
I checked the test that I had written (CodeGen/AArch64/win64_vararg.ll) and found one issue.
Mon, Oct 9
Changed the section name comparison to ==.
Added a fixme comment about the truncated section name, flipped the ifdef in the assembly source. Didn't implement findFunctionName.
Updated a comment together in sync with the updated code.
Fri, Oct 6
Updated the comment as requested.
Wed, Oct 4
@martell I think this patch can be discarded now. The CMake parts for mingw libs have been committed, and libunwind works for SjLj exceptions on mingw on x86, x86_64 and armv7 now (although only for static builds).
Tue, Oct 3
Mon, Oct 2
Changed the if to a switch, added comments about what instructions are supposed to be generated, removed the superfluous conditional in the 32 bit codepath, expanded the test for x86_64 linux, renamed register variables as suggested (and renamed Base into BReg).
Sun, Oct 1
Simplified by making the enclosing function a member function to allow it using getGlobalWrapperKind instead.
Works fine with the version from r314632 (with a minor fixup in r314635).
Fri, Sep 29
Also get rid of some of the errors with -verify-machineinstrs.
Fixed the issues in unoptimized builds; it took some time to figure out that I couldn't use TargetOpcode::COPY to zero-extend a 32 bit register into 64 bit, but had to use TargetOpcode::SUBREG_TO_REG. Also now using more virtual registers for each intermediate value instead of reusing them - this seemed to produce more sensible annotated output from different register allocators (and doesn't matter when using optimizations properly). But if you prefer, I can reduce it down to just using as many virtual registers as before.