Martin Kinkelin
f545d57ea9
Merge pull request #4007 from Ast-x64/riscv64
...
RISCV64: Initial support
2022-09-10 19:16:12 +02:00
Nicholas Wilson
8f6814e42a
Use typed load in gen/abi.cpp
( #4060 )
2022-08-28 14:53:48 +08:00
Ast-x64
40ec6da71f
RISCV64: Initial support
...
This adds support for riscv64gc with default LP64D ABI.
2022-06-28 22:37:21 +08:00
Martin Kinkelin
0fd5c6ec16
Merge pull request #3873 from kinke/no_reverse
...
Don't reverse parameters order for extern(D)
2022-03-08 17:03:17 +01:00
Martin Kinkelin
dc25da9557
ABI: Handle extern(C++) delegates for 32-bit MSVC with __thiscall convention
2022-02-22 14:48:38 +01:00
Martin Kinkelin
369cfd13ce
Adapt to TY enum class
2021-09-07 16:51:19 +02:00
Martin Kinkelin
1e00f63045
Adapt to upstream global.params.* -> target.* shuffling
2021-05-29 00:19:22 +02:00
Martin Kinkelin
44daef934a
Add support for 'noreturn' type
...
It's apparently already in the AST, e.g., for core.internal.abort.
2021-02-28 18:57:45 +01:00
Martin Kinkelin
bdc317e648
Implement ABI stuff for -preview=in ( #3578 )
...
I.e., the ABI-specific decision for which parameter types to prefer
passing a ref over a value.
The x86_64 and AArch64 ABIs are pretty clear - use a ref if the POD type
cannot be passed in registers. For all others, use a simple default
heuristic based on the type size - if larger than 2 machine words, use a
ref. Note that this includes x87 `real` for the 32-bit x86 ABI.
2021-01-08 17:42:08 +01:00
Martin Kinkelin
079858f3b2
Upgrade frontend & libs to early v2.095.0 ( dlang/dmd@a4274b3c39 )
2020-11-27 17:45:13 +01:00
Martin Kinkelin
d92ba9a552
Win64 extern(D) ABI: Pass/return Homogeneous Vector Aggregates in SIMD registers ( #3610 )
...
Corresponding to Microsoft's __vectorcall, see
https://docs.microsoft.com/en-us/cpp/cpp/vectorcall?view=msvc-160 .
2020-11-12 00:06:08 +01:00
Martin Kinkelin
f202c851ae
Upgrade frontend & libs to v2.094.0-beta.1
2020-09-22 00:06:19 +02:00
Martin Kinkelin
e9164f1f1a
Refactoring: Introduce ArgTypesRewrite
2020-05-03 16:31:46 +02:00
Martin Kinkelin
d603010159
Refactoring: Introduce TargetABI::isExternD()
2020-05-03 16:31:46 +02:00
Martin Kinkelin
04ed200d14
Refactoring: Introduce BaseBitcastABIRewrite
2020-05-03 16:31:46 +02:00
Martin Kinkelin
5b91efda25
ABI: Switch to front-end isHFVA() check
...
Which includes support for Homogeneous Vector Aggregates and should be
generally more correct than our previous LDC-specific version (I've
revised it based on the official AArch64 docs).
2020-05-02 02:40:18 +02:00
Martin Kinkelin
1f5c442519
Revise recent adaptations to frontend refactorings
2020-01-06 17:01:31 +01:00
Martin Kinkelin
4ac7f0554b
Adapt to frontend refactorings
2019-12-22 16:29:45 +01: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
Martin Kinkelin
5451a072a8
Refactoring: Free TargetABI from legacy magic C++ structs ( #3073 )
...
Which have been superseded by magic enums (in core.stdc.config).
2019-07-01 21:48:01 +02:00
Martin Kinkelin
e52199469f
Upgrade front-end & libs to v2.087.0-beta.1
2019-06-21 15:39:45 +02:00
Martin Kinkelin
5e93ed0dfd
Upgrade front-end & libs to v2.085.0-beta.1
2019-03-01 18:19:00 +01:00
Martin Kinkelin
32ecbdd266
Upgrade front-end & libs to v2.084.0-beta.1
2018-12-18 02:31:57 +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
7776c4081b
Upgrade frontend & libs to v2.083.0-beta.1
2018-10-20 16:19:46 +02:00
Martin Kinkelin
78ce63efa5
UnknownTargetABI: Pass static arrays with byval attribute
...
This should be a more sensible default behavior, treating a static array
like a struct with the corresponding number of fields.
2018-06-19 20:15:06 +02:00
Martin Kinkelin
9b6b256399
Fix TargetABI::isPOD() for static arrays of non-PODs
2018-06-19 20:13:03 +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 Kinkelin
3ca43c51b8
Use IndirectByvalRewrite for non-POD args and extern(C++) on Posix ( #2728 )
...
Fixing one aspect of issue #2702 ; not tackling the different destruction
rules yet.
2018-06-19 20:09:35 +02:00
Martin Kinkelin
29d609d63d
Refactoring: Introduce TargetABI::reverseExplicitParams()
2018-05-30 22:42:00 +02:00
Martin Kinkelin
92913d4c08
Store front-end D function type in IrFuncTy
...
As we do for IrFuncTyArg. We'll need access to the front-end linkage for
the Posix ABIs too in order to implement indirect-by-value passing of
non-PODs for `extern(C++)`.
2018-05-30 22:41:48 +02:00
Martin Kinkelin
8faab8b684
Refactoring: Add ABIRewrite::applyTo() for convenience
...
Allowing the ABIRewrite to adapt the IrFuncTyArg appropriately and
reducing code duplication.
2018-05-26 22:09:37 +02:00
Martin
d983cd01c5
Add support for new magic structs __c_(u)longlong
...
To be mangled as C++ (unsigned) long long.
For MSVC targets, D (u)long is C++-mangled as (unsigned) long long, so
there's no need for these magic structs.
For 32-bit POSIX targets, D (u)long is also a natural fit already.
For 64-bit POSIX targets however, D (u)long is C++-mangled as (unsigned)
long, so there's no corresponding D type, and these magic structs are
needed. Especially since macOS defines `int64_t` as `long long`, unlike
Linux (`long`).
2018-04-13 21:13:38 +02:00
Martin
1fb269f940
Drop support for LLVM < 3.7
2017-07-16 02:18:00 +02:00
Martin
82005009e7
Refactor and fix intrinsics for variadic functions
...
I.e., va_start(), va_copy() and va_arg().
2016-06-28 22:40:14 +02:00
Martin
de9149f1b6
Remove getLVal() from DValue and add DtoL/RVal() overloads
2016-06-13 22:30:16 +02:00
Martin
963a10b225
Let DValue types handle memory-only types consistently
...
I.e., disallow memory-only values from being represented as DImValues
and disallow getRVal() for such types instead of returning the address.
2016-06-13 22:30:14 +02:00
Martin
e3e2f4b2e9
DValue: Remove method getType()
...
Use the existing public field directly instead.
It's shorter and different than LLValue's getType() (making it easier
to discriminate DValues and LLValues for experienced LDC devs imho).
2016-06-13 22:30:13 +02:00
Martin
769dac1b1f
Remove obsolete helper ABIRewrite::storeToMemory()
2016-05-29 10:41:23 +02:00
Martin
fc6c340661
Optimize ABIRewrite system for lvalues
...
Allow ABIRewrites to return the D parameter's LL value directly.
Most rewrites store to memory anyway, so let the D parameter point
directly to that memory instead of a dedicated alloca bitcopy.
2016-05-28 21:03:56 +02:00
Dan Olson
cd216538f9
Merge branch 'master' into objc-wip
2016-04-08 22:38:39 -07:00
Johan Engelen
823a9efe26
Merge branch 'ltsmaster'
...
Solved merge conflicts in:
gen/abi.cpp
gen/toir.cpp
runtime/druntime
tests/d2/dmd-testsuite
tests/lit.site.cfg.in
2016-03-29 11:40:20 +02:00
Kai Nacke
c1c7846e74
Introduce new ABI class for PPC64LE.
...
The ABI for PPC/PPC64 big-endian is quite similar.
But the ABI for PPC64 little-endian is more like the ARM ABI.
2016-03-28 03:14:00 +02:00
Dan Olson
462b089492
Move Objective-C runtime choice to TargetABI
2016-03-23 23:54:49 -07:00
Kai Nacke
6e0badadf1
Merge remote-tracking branch 'origin/ltsmaster'
2016-03-13 16:44:07 +01:00
Kai Nacke
412aa04ef6
Linux/AArch64: More ABI implementation.
...
This is still not perfect but already fixes some test failures.
2016-03-12 20:44:19 +00:00
Johan Engelen
acdcc4a8c1
Merge branch 'master' into merge-2.069
2016-02-13 20:12:17 +01:00
Kai Nacke
96b452b218
Add armeb/thumbeb to abi switch
2016-02-06 16:43:30 +01:00
Dan Olson
b9b4564d22
Implement ARM AAPCS ABI
...
This is the bulk of the AAPCS (Procedure Call Standard for the ARM
Architecture) used for C interop. This will be used for both arm and
thumb target triples. The extern(D) ABI tries to follows the AAPCS with
a few exceptions.
2016-02-05 09:04:09 -08:00
Johan Engelen
29ce4012af
dmd2 --> ddmd. Merge (almost all of) our changes to dmd source into the new D source of dmd 2.069.2.
...
Also adds the CMake infrastructure to compile and link the D source files.
The build is partially broken:
- A few files in Phobos and druntime do not build
- MSVC build is broken because of unresolved symbols involving reals
2016-01-28 19:03:58 +01:00