27 Commits

Author SHA1 Message Date
David Nadlinger
5c518a16ec Merged 2.061 frontend. 2013-01-04 06:22:53 +01:00
kai
4ea7e8dbf8 Add pragma to install function as global C runtime ctor or dtor.
DMD has the obscure functionality to install functions starting with
_STI_ as global ctors and funtions starting with _STD_ as global
dtors. IMHO a pragma is a better way to specify the behaviour.

This commit adds pragma(LDC_global_crt_ctor) and
pragma(LDC_global_crt_dtor). If the pragma is specified on a function
or static method then an entry is made in the corresponding list. E.g.
in monitor_.d:

    extern (C) {
        #pragma(LDC_global_crt_ctor)
        void _STI_monitor_staticctor()
        {
            // ...
        }
    }

This works on Linux without problems. On Windows with MS C Runtime
ctors work always but dtors are invoked only if linked against the
static C runtime. Dtors on Windows require at least LLVM 3.2.
2012-12-22 21:18:37 +01:00
David Nadlinger
cbc7028e50 Added vendor-prefixed pragma names, deprecated old ones. 2012-12-08 21:38:54 +01:00
David Nadlinger
8e13d109ce Removed unused va_intrinsic pragma identifier. 2012-12-08 21:38:54 +01:00
David Nadlinger
dfa1bd954d Removed {insert, extract}element and shufflevector pragmas.
They have been superseeded by the inline IR pragma and ldc.simd,
and have only been around for a short time (and not in any
released version).
2012-12-08 21:38:54 +01:00
Jernej Krempuš
7bbe782615 Pragma llvm_inline_ir
Adding pragma llvm_inline_ir.

Improved the error messages.

Append "ret void" when the return type is void

Improved the error message

in case when the string passed as llvm inline ir isn't valid llvm
assembly language.

LLVM 3.2 fix.

Add attribute AlwaysInline inside DtoInlineIRFunction.

Always generate a body for llvm_inline_ir

Also, always make llvm_inline_ir functions linkonce_odr. Because
the body is always generated when a module uses a llvm_inline_ir
function, the fact that the linker removes the function shouldn't
cause problems.
2012-11-08 22:05:15 +01:00
Jernej Krempuš
b798974f3a Added pragma insertelement. 2012-10-02 22:22:53 +02:00
Jernej Krempuš
2cf5d8c2a0 Added pragma extractelement 2012-10-02 21:37:27 +02:00
David Nadlinger
837ef30fec Merged DMD 2.060 frontend.
Upstream Git tag v2.060 (e8fe11c20249cb9e42538be88c99b74ede4d12e3).
2012-09-07 03:51:31 +02:00
Jernej Krempuš
100907ffa2 Added pragma shufflevector. 2012-08-06 20:50:33 +02:00
Alexey Prokhin
bca73ec8b9 Merged dmd 2.059beta 2012-04-05 15:30:00 +04:00
Alexey Prokhin
50bbeb7c6f Remerged dmd2 frontend using git subtree 2012-04-05 11:12:22 +04:00
Alexey Prokhin
038825a195 Temporary removed dmd2 frontend 2012-04-05 11:10:26 +04:00
Alexey Prokhin
e74e55df89 Merge 2.058beta 2012-02-15 13:23:16 +04:00
Alexey Prokhin
88cff99bd4 Merge dmdfe 2.057 2011-12-16 19:44:56 +04:00
David Nadlinger
ffe37c4a62 Merge remote-tracking branch 'upstream/llvm3.0' 2011-11-12 19:51:30 +01:00
Alexey Prokhin
b52c224d57 Merge v2.056 2011-11-01 11:44:03 +04:00
Alexey Prokhin
45426ca60d Implemented atomic intrinsics for llvm 3.0
Unline older versions, llvm 3.0 provides atomic instructions, not intrinsics.
The patch wraps the instructions into intrinsics, so they will be accessible
from d code.
2011-10-25 15:43:49 +04:00
Alexey Prokhin
0e754b5acd Merge dmd v2.055 2011-09-13 21:01:32 +04:00
Alexey Prokhin
462cdda4ae Merge dmdfe 2.053beta 2011-07-19 10:14:04 +04:00
Alexey Prokhin
6d22dd7999 Updated to 2.050 2010-11-08 16:55:35 +03:00
Alexey Prokhin
df87607ba2 Updated to 2.049 2010-09-30 21:54:45 +04:00
Robert Clipsham
089e792258 DMD 2.032 Merge. 2009-09-08 10:07:56 +01:00
Robert Clipsham
c5be82c5ae LDC 2 compiles again. 2009-05-30 17:23:32 +01:00
Tomas Lindquist Olsen
fc480b7fd8 SWITCHED TO LLVM 2.5 !
Applied patch from ticket #129 to compile against latest LLVM. Thanks Frits van Bommel.

Fixed implicit return by asm block at the end of a function on x86-32. Other architectures will produce an error at the moment. Adding support for new targets is fairly simple.

Fixed return calling convention for complex numbers, ST and ST(1) were switched around.

Added some testcases.

I've run a dstress test and there are no regressions. However, the runtime does not seem to compile with symbolic debug information. -O3 -release -inline works well and is what I used for the dstress run. Tango does not compile, a small workaround is needed in tango.io.digest.Digest.Digest.hexDigest. See ticket #206 .
2009-02-08 05:26:54 +01:00
Tomas Lindquist Olsen
b7bea99dbb Merged DMD 2.021 frontend.
Removed generated files from dmd/dmd2 dirs.
2008-12-13 16:14:37 +01:00
Tomas Lindquist Olsen
c4c1c1d72e Added initial D2 support, D2 frontend and changes to codegen to make things compile. 2008-11-11 01:38:48 +01:00