Commit graph

21 commits

Author SHA1 Message Date
Martin Kinkelin
9ce57807c0 Drop support for LLVM 9 and LLVM 10 2023-07-29 01:12:43 +02:00
Martin Kinkelin
b640f5d852 Merge remote-tracking branch 'origin/dmd-rewrite-stable' into merge-2.103
Conflicts:
	dmd/dtemplate.d
	dmd/expression.h
	dmd/mtype.d
	dmd/root/ctfloat.h
	dmd/root/longdouble.h
	dmd/target.d
	runtime/druntime/src/core/int128.d
	runtime/druntime/src/core/thread/fiber.d
2023-03-12 20:33:38 +01:00
Johan Engelen
51422dca53
Replace sprintf with safer snprintf, fixes compilation warning on newer clang versions. (#4304) 2023-01-25 00:55:10 +01:00
Martin Kinkelin
87a8faf8aa Get compiler to compile after frontend changes 2022-11-25 04:17:13 +01:00
Martin Kinkelin
834f666ce5
Raise min LLVM version to 6.0 (#3493) 2020-07-13 20:42:50 +02:00
Martin Kinkelin
78697880ed Revert to host C runtime for printing decimal strings 2020-05-06 18:49:18 +02:00
Martin Kinkelin
cc1de383f5 Don't use host C runtime for printing compile-time reals, use LLVM
Primary motivation are apparent printf issues for the hex format and
quadruple C `long double` in Android's Bionic runtime for x86_64.
This required an extra Termux patch until now:
3c0e8cd65e/packages/ldc/ldc-x64-sprintf.patch
2020-05-06 18:47:41 +02:00
Martin Kinkelin
e2debcea17
Improve detection of host real_t semantics (#3414)
Supporting more hosts and fixing early stoppers such as issue #3270.
2020-05-04 20:34:31 +02:00
Martin Kinkelin
2d86e49fba
Finalize support for LLVM 10 (#3323) 2020-02-14 17:53:40 +01:00
Fangrui Song
0a007a55f8
Fix StringRef conversion for LLVM 11 (777180a32b61070a10dd330b4f038bf24e916af1) (#3305) 2020-02-01 02:52:35 +01:00
Martin Kinkelin
e52199469f Upgrade front-end & libs to v2.087.0-beta.1 2019-06-21 15:39:45 +02: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
7776c4081b Upgrade frontend & libs to v2.083.0-beta.1 2018-10-20 16:19:46 +02:00
joakim-noah
942fd03677 Add Android/x64 support (#2874) 2018-10-13 13:21:44 +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
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
1fb269f940 Drop support for LLVM < 3.7 2017-07-16 02:18:00 +02:00
Martin
fdf74b6d6a Let LLVM parse floating-point literals instead of host C runtime 2017-03-25 22:16:16 +01:00
Johan Engelen
86965100dc Fix unused variable warnings for LLVM >= 4.0 (#2040) 2017-03-18 20:57:22 +01:00
Martin
0e71a760ae Limited support for arbitrary target reals
While parsing of floating-point literals and CTFE still operate with the
host LDC's real type, compile-time reals can in principle be emitted in
arbitrary precision via LLVM software conversion, therefore paving the way
for cross-compilation to all targets.

The representable constants are still limited by the compile-time real_t
precision. E.g., LDC on Windows with its 64-bit reals can't hold and emit
an 80-bit `real.max` when cross-compiling to a non-Windows x86(_64)
target; the compile-time value will silently overflow to infinity and
later be emitted as 80-bit infinity.

LDC on AArch64 with its 128-bit quad-precision reals on the other hand can
hold and emit reals for all targets, making it a universal cross-compiler
with quad-precision compile-time reals in hardware.

We don't use the strange 2x64-bit PPC double-double format (see
`getRealType()` in `ir/irtype.cpp`), but would more or less support it
(the type properties (max, min_normal...) still need to be determined;
LLVM isn't sure about those either...).
2017-02-11 14:24:46 +01:00