Commit graph

16 commits

Author SHA1 Message Date
Kai Nacke
2ad804c16b Implement core.bitop.volatileLoad() and core.bitop.volatileStore()
The implementation introduces 2 new intrinsics: ldc.bitop.vld and ldc.bitop.vst.
2015-03-22 00:11:43 +01:00
Alexey Prokhin
0f7a3b64c5 Make FuncDeclaration::isIntrinsic and FuncDeclaration::isVaIntrinsic free functions 2014-10-05 16:08:58 +04:00
David Nadlinger
04570399d4 Implement previously inoperative pragma(LDC_no_moduleinfo).
GitHub: Fixes #571.
2014-07-10 01:20:31 +02:00
David Nadlinger
fc7acc48fc Add pragma(LDC_extern_weak) for symbols with (ELF-style) weak linkage.
For now, this is only an internal feature to be used in the
implementation of rt.sections_linux.
2014-07-10 00:45:06 +02:00
David Nadlinger
cb341586e3 First merge of 2.064 beta.
This corresponds to DMD commit a913ce4bc59a94a022a27e390fc841f4aededffb.

Doesn't build Phobos yet.
2013-10-29 19:21:15 +01:00
David Nadlinger
0a96aea868 Sort includes according to style guidelines:
1. Main include corresponding to .cpp file, if any.
 2. DMD and LDC includes.
 3. LLVM includes.
 4. System includes.

Also updated a few include guards to match the default format.
2013-02-07 21:20:55 +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
9458911839 Added LLVM-style license headers to all our files. 2012-12-16 17:19:14 +01:00
David Nadlinger
94bd923e96 Fixed pragma(LDC_verbose). 2012-12-08 21:41:22 +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
Jernej Krempuš
100907ffa2 Added pragma shufflevector. 2012-08-06 20:50:33 +02:00
Alexey Prokhin
f237d85af0 Implemented bt/btc/btr/bts intrinsics 2012-02-15 13:16:34 +04:00
Alexey Prokhin
4d3ba3594c Refactoring: moved ldc specific code from dmd/attrib.c and dmd2/attrib.c into gen/pragma.cpp 2012-02-15 13:16:06 +04:00