Commit graph

30 commits

Author SHA1 Message Date
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
dd21a805ee Trim signature of method ABIRewrite::type() 2016-05-29 11:04:29 +02:00
Rainer Schuetze
c74d4c2231 Merge remote-tracking branch 'remotes/origin/master' into merge-2.071
# Conflicts:
#	runtime/druntime
#	tests/d2/dmd-testsuite
2016-04-17 21:24:56 +02:00
Dan Olson
cd216538f9 Merge branch 'master' into objc-wip 2016-04-08 22:38:39 -07:00
David Nadlinger
9f998a398d Initial merge of upstream v2.071.0-b2
Notably, the glue layer side of the changed multiple interface
inheritance layout (DMD a54e89d) has not been implemented yet.

This corresponds to DMD commit 3f6a763c0589dd03c1c206eafd434b593702564e.
2016-04-03 15:15:14 +01: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
7e03ee4587 Linux/AArch64: More changes to ABI implementation.
- Remove byval attribute
- Do not reverse parameter list

The latter point is required by the spec at http://dlang.org/spec/abi.html:

"The extern (C) and extern (D) calling convention matches the C calling
convention used by the supported C compiler on the host system."
2016-03-13 14:38:32 +00:00
Kai Nacke
657df158ba Linux/AArch64: Better ABI implementation. 2016-03-13 01:54:16 +00: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
Kai Nacke
d4dc52d4aa Fix compile errors caused by D frontend
- scope is now _scope
- targetTriple requires -> instead of .
- factory method createTypeIdentifier() instead of new TypeIdentifier()
2016-03-03 21:41:46 +01:00
Kai Nacke
24adf155ff Revert "Revert "Merge branch 'ltsmaster'""
This reverts commit 1653911600.
2016-03-03 21:12:53 +01:00
Kai Nacke
1653911600 Revert "Merge branch 'ltsmaster'"
This reverts commit dcb781004b, reversing
changes made to 3c6f09faf0.
2016-03-03 13:14:39 +01:00
Kai Nacke
dcb781004b Merge branch 'ltsmaster' 2016-03-03 07:50:17 +01:00
Kai Nacke
815b13be38 Run semantic on Type::tvalist.
This is required to resolve the type for AAPCS/AAPCS64.
Up to now it was not necessary because only char* was used.
AAPCS/AAPCS64 use a special extern(C++) struct __va_list.
2016-02-29 08:38:08 +00:00
Johan Engelen
acdcc4a8c1 Merge branch 'master' into merge-2.069 2016-02-13 20:12:17 +01:00
Kai Nacke
f91f019e42 AArch64: Fix type error while using __va_list_mem 2016-01-30 11:40:57 +01: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
Martin
b8de3531a8 Fixes and adaptations for generic x86 and Win64 TargetABIs
* x86: Return most POD aggregates <= 8 bytes in registers
  * For extern(D), as in official Win32 D ABI specs [previously: sret]
  * For all other calling conventions too, except for Linux and NetBSD
    [previously: OSX and MSVC only]
* MSVC++ and extern(C++): treat structs with constructors as non-POD,
                          for both x86 and Win64 ABIs
* Win64: Pass and return magic C++ structs directly as LL aggregates,
         rendering MSVCLongDoubleRewrite obsolete
* x86: Fix regression introduced by previous commits wrt. passing the
       last struct argument in EAX register
2015-12-08 19:15:15 +01:00
Martin
e7f26a94b0 Prepare generic x86 TargetABI for proper MSVC support
Based on Rainer's work in
3e36652c2c
2015-12-06 19:09:33 +01:00
Martin
ddfaac10b3 Rename DtoAggrCopy/ZeroInit() to DtoMemCpy/SetZero() overloads
And replace some obvious load->store combos by a memcpy.
2015-12-04 22:23:09 +01:00
David Nadlinger
9df487edff gen/ir: clang-tidy the world 2015-11-02 11:30:40 +02:00
David Nadlinger
44b0f7b615 driver/gen/ir: clang-format the world
This uses the LLVM style, which makes sense for sharing code
with other LLVM projects. The DMD code we use will soon all
be in D anyway.
2015-11-02 00:28:01 +02:00
Martin
2d959ea540 Make use of C++11 range-based for
Should be available now that support for LLVM < 3.5 has been dropped.
2015-11-01 14:49:04 +01:00
Martin
9e194bfe2c Refactor store-to-new-alloca code occurrences. 2015-09-25 17:12:42 +02:00
Kai Nacke
5ab85d8387 Define __va_list_tag for AArch64 2015-09-22 22:59:10 +02:00
kai
29b8a64dca AArch64: Add __va_list structure for varags.
Like the System V ABI the AACPS64 uses a special structure for
vararg handling. This is the first start to add this structure.
Handling in core.stdc.stdarg is missing!
2015-05-18 07:44:18 +02:00
Kai Nacke
8aabe36b43 Add ABI class for AArch64.
With this class most compile errors are fixed.
Notable exceptions are std.math and core.stdc.stdarg.
2015-05-04 19:05:28 +02:00