Commit graph

79 commits

Author SHA1 Message Date
Martin Kinkelin
079858f3b2 Upgrade frontend & libs to early v2.095.0 (dlang/dmd@a4274b3c39) 2020-11-27 17:45:13 +01:00
Martin Kinkelin
711fdcca42 Populate new Target::architectureName for JSON output 2020-09-22 16:32:48 +02:00
Martin Kinkelin
f202c851ae Upgrade frontend & libs to v2.094.0-beta.1 2020-09-22 00:06:19 +02:00
Martin Kinkelin
834f666ce5
Raise min LLVM version to 6.0 (#3493) 2020-07-13 20:42:50 +02:00
Martin Kinkelin
c29e734878 CMake: Use -linkonce-templates when compiling ldc2/ldmd2/ldc-build-runtime... all-at-once
When compiling with an LDMD host compiler, to speed-up optimization.
2020-06-29 00:24:08 +02:00
Martin Kinkelin
5870b41c1d Upgrade frontend & libs to early v2.093.0 (dlang/dmd@eee9185638) 2020-06-21 05:31:24 +02:00
Martin Kinkelin
c6430a32e4
Merge pull request #3415 from kinke/vsoptions
Adopt DMD's MSVC toolchain detection
2020-05-04 20:31:38 +02:00
Martin Kinkelin
3786614967 Merge upstream stable (dlang/dmd@2dc6c9d619) 2020-05-03 13:36:07 +02:00
Martin Kinkelin
6d7819f8c6 AArch64: Populate a struct's argTypes
The only observable effect for now is that non-Apple AArch64
TypeInfo_Struct emissions might contain a populated m_arg1, which is
a prerequisite for TypeInfo-based core.vararg.va_arg().
2020-05-02 03:31:22 +02:00
Martin Kinkelin
18406bcc06 Adopt DMD's MSVC toolchain detection
This reduces the overhead for auto-detecting and setting up an MSVC
toolchain from a very rough 1 second to about 8 milliseconds on my box.
Enabling the auto-detection by default (and so preferring MSVC over the
'internal' toolchain if there's a Visual C++ installation) is now
possible, fixing issues like #3402.

The MSVC setup now consists of the bare minimum - prepending 3
directories to the LIB env var and 1-2 directories to PATH.
2020-04-30 21:45:56 +02:00
Martin Kinkelin
ff36be2c01
Do not fallback to host for critical section size of unknown targets (#3389)
Instead, error out whenever requested by an expression-less
`synchronized` statement, including source LoC to track it down.

This is safer, especially since the previous initial warning may likely
be suppressed, and makes this host-agnostic.

Also suppress previous warnings about unknown `` and `none` OS, treating
these like `unknown`.
2020-03-30 21:26:51 +02:00
Jacob Carlborg
bcb013274b Fix warning about critical section size for Apple ARM 2020-01-19 20:57:23 +01:00
Martin Kinkelin
ecaa413ccc Upgrade frontend & libs to v2.090.0-beta.1 2019-12-22 16:29:29 +01:00
Martin Kinkelin
1662406231 Upgrade front-end & libs to v2.088.0-beta.1 2019-08-25 00:36:15 +02:00
Martin Kinkelin
8da4e6f9cf
Merge pull request #3093 from kinke/merge-2.087
Upgrade front-end & libs to v2.087.1+
2019-08-06 22:21:18 +02:00
skoppe
b593dda535 return 0 in getCriticalSectionSize for wasm (#3119) 2019-07-26 21:42:01 +02:00
Martin Kinkelin
e52199469f Upgrade front-end & libs to v2.087.0-beta.1 2019-06-21 15:39:45 +02:00
Nicholas Wilson
b750ce0c27
add __traits(getTargetInfo, "dcomputeTargets") (#3090) 2019-06-14 10:49:46 +08:00
Martin Kinkelin
a44c78fb88 Disallow some vector ops and fix integral vector identity comparisons
Bail out on unsupported vector ops (not checking the rhs type for binops
though) in the frontend instead of causing LLVM errors.

Also precompute the target's critical section size once at startup, like
DMD.
2019-05-26 05:11:16 +02:00
Martin Kinkelin
6c3d8b952e Add cmdline option -extern-std=c++{98,11,14,17} 2019-03-01 18:19:00 +01:00
Martin Kinkelin
5e93ed0dfd Upgrade front-end & libs to v2.085.0-beta.1 2019-03-01 18:19:00 +01:00
Martin Kinkelin
8a87cadf62 Resync gen/target.cpp with dmd/target.d 2018-12-12 12:19:17 +05:30
Joakim
1c82d12cd0 Android: change long double mangling on Android/x64 to g 2018-12-12 12:19:17 +05:30
Martin Kinkelin
22166c81b2 Add proper toArgTypes() for System V x86_64 ABI
Make the existing 64-bit code in argtypes.d DMD-specific (required due
to codegen issues) and add a new separate implementation for the SysV
x86_64 ABI to be used by LDC/GDC, closely following the algorithm laid
out in the spec [1].
Also don't needlessly compute a struct's argtypes for Win64 and
non-x86[_64] targets.

This fixes LDC ABI issues wrt. C[++] compatibility on Posix x86_64,
e.g., https://issues.dlang.org/show_bug.cgi?id=13957.

I went with signed integers to represent GP registers, and float/double/
__vector(double[N]) for vector registers (SSE + AVX); integer signedness
and vector element type are arbitrary.

[1] https://www.uclibc.org/docs/psABI-x86_64.pdf
2018-11-02 17:19:25 +01:00
Martin Kinkelin
4a23399236 Aim for consistent #includes (order + dir prefix)
I surely missed a few.
2018-10-20 16:19:46 +02:00
Martin Kinkelin
0bd9a10234 Add LDC-specific support for __traits(getTargetInfo) 2018-10-20 16:19:46 +02:00
Martin Kinkelin
7776c4081b Upgrade frontend & libs to v2.083.0-beta.1 2018-10-20 16:19:46 +02:00
Martin Kinkelin
40cf784cbe Misc. merge fixes, minor adaptions 2018-08-17 21:31:53 +02:00
Martin Kinkelin
3da5a12f4a Use 80-bit compile-time reals on Windows/MSVC hosts
Consistent with DMD and enabling seamless cross-compilation to Posix
x86(_64) targets.
2018-06-24 03:59:14 +02:00
Martin Kinkelin
acf7de3ce6 Initialize new Target::twoDtorInVtable appropriately 2018-06-20 01:52:38 +02:00
Martin Kinkelin
a133ffad56 MSVC: Port Rainer's upstream extern(C++) method ABI fixes
From https://github.com/dlang/dmd/pull/8330.
2018-06-19 20:13:02 +02:00
Martin
8583c117bc Adapt new Target::isReturnOnStack() to LDC
It's apparently used for std.traits.
2018-04-28 00:42:50 +02:00
Martin
7f6b7b9f13 Fix C long size for 64-bit MSVC target 2018-04-13 21:13:38 +02:00
Martin
6b0ca0e194 64-bit OSX: Revert to mangling (u)long as C++ (unsigned) long
Primarily not to break size_t interop. A size_t is probably much more
frequently used than `(unsigned) long long` (which Apple sadly chose for
their C++ `(u)int64_t`).
2018-04-13 21:13:38 +02:00
Martin
df4f854dd5 Upgrade to D v2.079.0-beta.1 2018-02-20 02:04:41 +01:00
Martin
197e65efde Merge branch 'master' into merge-2.078
Conflicts:
	driver/main.cpp
	gen/cl_helpers.h
	gen/declarations.cpp
	runtime/druntime
	tests/d2/dmd-testsuite
2018-01-20 11:20:17 +01:00
Martin
27deb2ff8c Get rid of obsolete gen/llvmcompat.h
Not needed anymore since C++11.
2018-01-12 20:20:47 +01:00
Martin
cfad799f48 Merge 2.078.0 front-end and stdlibs 2018-01-06 01:39:18 +01:00
Martin
c6a9affc8f Support catching C++ exceptions for MSVC targets 2017-11-27 18:59:29 +01:00
Martin
dfe45715ba Enable catching C++ exceptions for non-MSVC targets 2017-11-26 18:41:01 +01:00
kinke
70c4c3cb74 Don't let Target::RealProperties alias Target::DoubleProperties (#2374)
Which is a serious problem if the host real_t is a double and the target
`real` features a higher precision (cross-compilation).
`Target::RealProperties` are set up for the target's `real`, so
max/min_normal/epsilon may over/underflow, and so would
`DoubleProperties` if aliased.
2017-10-25 00:18:11 +02:00
Martin
0b28925e9a Win32: Remove extra leading underscore from D symbol mangling
This is compatible with DMD.
2017-10-07 14:06:17 +02:00
Martin
3e554f2bfd Revert "OSX: Make sure T.mangleof matches the final mangle for C++ symbols"
This reverts commit c49464a57e.
2017-09-30 01:04:28 +02:00
Martin
c49464a57e OSX: Make sure T.mangleof matches the final mangle for C++ symbols
By using upstream's Target.prefixName(), which prepends an additional
underscore on OSX/Darwin for C++ symbols.
We then need to prevent LLVM from implicitly prepending a third one.
2017-09-28 20:17:02 +02:00
Martin
980c5620ec Merge branch 'master' into merge-2.075
Conflicts:
	runtime/druntime
2017-08-04 22:43:16 +02:00
Martin
2616261fd2 Revise all LDC-specific errors/warnings/deprecs and insert backticks
For DMD's new syntax highlighting. I grepped in all .{h,cpp} files only.
2017-08-03 22:53:49 +02:00
Martin
c51c2c0d55 Merge 2.075.0 front-end and stdlibs 2017-07-30 03:03:28 +02:00
Martin
5dd07dcfbe Switch to special quiet NaN as init value for all FP types
As 'processing' a signalling NaN may convert it to a quiet NaN. Apparently
happening on 32-bit x86 using the x87 FPU, but not on x86_64 with SSE.

This fixes potential issues with different constants being used when
mixing natively and cross-compiled objects/libs and failing bitwise `is`
comparisons etc.

See https://forum.dlang.org/post/nsp1ql$ivu$1@digitalmars.com for Martin
Nowak's summarized findings.
2017-07-28 01:13:13 +02:00
Martin
f17ff5efe0 Don't depend on host real_t.init, use LLVM's signalling NaN instead 2017-07-28 01:09:02 +02:00
Martin
03d803419d Fix Target.RealProperties potentially aliasing Target.DoubleProperties
In case the host real_t is double (e.g., for MSVC hosts).
2017-06-10 04:30:43 +02:00