Tomas Lindquist Olsen
dc5944df99
Implemented proper support for naked asm using llvm module level asm. Still not 100% complete, but already 1000 times better that what we had before. Don's BignumX86 implementation from Tango (when turned into a standalone unittest) seems to fully work with no changes, and great performance :)
...
Fixed align N; in asm blocks.
Fixed inreg parameter passing on x86 for ref/out params.
Removed support for lazy initialization of function local static variables, I have no idea why I ever implemented this, it's not in the D spec, and DMD doesn't support it :P
Some of the global variable related changes might cause minor regressions, but they should be easily fixable.
2009-02-03 08:54:57 +01:00
Christian Kamm
cdbc4f84d2
Fix warnings on x86-64. By fvbommel.
2008-11-28 21:24:08 +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
Christian Kamm
bc80a83666
Merge wilsonk's x86-64 inline assembly.
2008-11-08 22:29:19 +01:00
Tomas Lindquist Olsen
bcafbe169d
Wrapped all the most potentially expensive logging calls in a conditional to only do work when actually requested.
...
Commented some logging calls that could potentially write out many megabytes of type dumps.
2008-10-01 18:32:31 +02:00
Christian Kamm
4e0b6b4bf0
Make sure functions containing inline asm are never inlined to avoid
...
duplicated labels.
2008-09-08 20:38:55 +02:00
Tomas Lindquist Olsen
b41a80cefc
Reverted some changes in the Tango patch, splitting asm block is simply not supported by llvm.
2008-08-24 16:51:17 +02:00
Christian Kamm
8362b86c5a
Move AllocaInst creation into DtoAlloca helper. Will enable special zero-init of fp80 reals' padding.
2008-08-05 19:28:19 +02:00
Christian Kamm
bcc4cfdea4
[svn r377] The previous check was too strict, it completely disallowed gotos within finally blocks. This reenables them as long as they don't cross a finally boundary.
2008-07-14 12:00:24 +02:00
Tomas Lindquist Olsen
832504e5d7
[svn r357] Merged DMD 1.033
2008-07-12 19:38:31 +02:00
Christian Kamm
ff52c70e1d
[svn r333] Fix inline asm bug with multiple branches to the same label.
2008-06-29 22:07:15 +02:00
Tomas Lindquist Olsen
0d160ffc76
[svn r330] Implemented synchronized statements.
...
Changed the tryfinally handlers to a more generalized EnclosingHandler.
Changed ClassInfoS to be mutable so they can be used as locks.
Added new BB after throw ala return/break etc.
2008-06-28 11:37:53 +02:00
Tomas Lindquist Olsen
03d26e1178
[svn r326] Fixed a bunch of issues with printf's that MinGW32 did not support.
...
Fixed problems with label collisions when using labels inside inline asm. LabelStatement is now easily reached given its
Identifier, which should be useful elsewhere too.
Enabled inline asm for building the lib/compiler/llvmdc runtime code, fixing branches out of asm makes this possible.
2008-06-27 22:04:35 +02:00
Christian Kamm
b064c794de
[svn r325] Removed dead code.
...
Added license info to code from GDC (David Friedman permitted us to use the files under the Artistic License).
Added asmLabel check to DtoGoto to avoid jumping into inline asm. Doesn't work currently as LabelDsymbol::asmLabel is never set to true.
2008-06-25 23:42:38 +02:00
Christian Kamm
7250b0630c
[svn r324] Small indentation fixes.
...
Added end of line to complex.cpp.
2008-06-25 20:42:30 +02:00
Christian Kamm
7b37093cff
[svn r323] Branching out of inline asm works.
...
Renamed emit_finallyblocks to DtoFinallyBlocks and moved to llvmhelpers.
Added enclosingtryfinally to AsmBlockStatement, so branches out of asm blocks respect finallys.
Refactored some GotoStatement code into DtoGoto.
2008-06-25 20:39:09 +02:00
Christian Kamm
37a74d1975
[svn r322] More asm-to-outside jumping work. Unfinished.
2008-06-24 22:48:33 +02:00
Christian Kamm
57977cd420
[svn r321] Fix bug in argument remapping functions.
2008-06-24 22:27:55 +02:00
Christian Kamm
84dd282b8c
[svn r320] Begun work on branches out of asm blocks. Unfinished.
2008-06-24 21:38:23 +02:00
Tomas Lindquist Olsen
306ebfca83
[svn r256] AsmBlockStatement was still being flattened in some cases.
...
Function parameters passed as arguments to inline asm was not given storage.
2008-06-08 22:07:10 +02:00
Tomas Lindquist Olsen
6ededdd9e3
[svn r253] Removed -inlineasm option. inline asm is now enabled by default unless the new -noasm option is passed.
...
Tried adding a stack trace print when compiler crashes, not sure it's working though.
Changed data layouts to match that of llvm-gcc.
Fixed casting function pointers.
Added support checks in AsmStatement.
2008-06-08 19:09:24 +02:00
Tomas Lindquist Olsen
28382e3567
[svn r250] Fixed the warning about dropping arguments to _Dmain when optimizing.
...
Did a few cleanups in inline asm code.
2008-06-08 08:03:19 +02:00
Tomas Lindquist Olsen
68d7827d35
[svn r249] Changed inline asm clobbers to a set instead of a list so we don't get duplicate clobbers.
2008-06-08 06:45:54 +02:00
Tomas Lindquist Olsen
fd8cec14e1
[svn r248] Fixed: labels in inline asm block now work for the normal case.
...
Fixed: inline asm blocks are now emitted as a single asm entity.
2008-06-08 06:15:51 +02:00
Tomas Lindquist Olsen
3e62d80b4f
[svn r247] fixed accessing global symbols from inline asm.
2008-06-08 01:07:58 +02:00
Tomas Lindquist Olsen
187d6523e3
[svn r245] initial support for labels in inline asm, broken :/
2008-06-07 21:31:38 +02:00
Tomas Lindquist Olsen
27634ea5b6
[svn r243] fixed inline asm arg_pointer args hopefully.
2008-06-07 19:19:30 +02:00
Tomas Lindquist Olsen
1af9e9814a
[svn r242] fixed (I think) arg_pointer inline asm args
2008-06-07 19:04:26 +02:00
Tomas Lindquist Olsen
47ac84b223
[svn r241] Fixed missing terminator for void main() with inline asm block.
2008-06-06 22:30:31 +02:00
Christian Kamm
cf4d71b02c
[svn r240] do not crash on zero length constraints string
2008-06-06 22:04:41 +02:00
Christian Kamm
54b7134d78
[svn r239] also use indirect modifier for update constraints
2008-06-06 21:51:40 +02:00
Christian Kamm
5ee938ab0a
[svn r238] use *m for memory input constraints and pass in their address
2008-06-06 21:44:17 +02:00
Tomas Lindquist Olsen
b917fe2f00
[svn r237] some inline asm output now seems to work, see tangotests/asm2.d
2008-06-06 20:51:43 +02:00
Tomas Lindquist Olsen
346d04aa8a
[svn r236] added initial codegen of inline asm, pretty buggy and incomplete still. see the tangotests/asm1.d test for a sample of what does
...
work!
2008-06-06 20:14:51 +02:00
Christian Kamm
68d5150c1b
[svn r235] rough port of GDC's inline assembler code, unfinished
2008-06-05 19:22:37 +02:00