Tomas Lindquist Olsen
4dee095dc3
Added support for using a temporary to implement emulated ABI return from inline asm, could be easier to use, but I think this will do. It's so extremely target dependent in any case that doing a completely generic approach seems hard.
2009-02-14 15:25:48 +01:00
Tomas Lindquist Olsen
3e17a21e0b
Merged a bunch recent dmd v1 frontend changes into the dmd v2 tree.
2009-02-13 22:20:30 +01:00
Christian Kamm
cedd029720
Automated merge with http://hg.dsource.org/projects/ldc
2009-02-12 18:39:14 +01:00
Christian Kamm
b3524ef5f4
Now that we're using LLVM 2.5, we can stop always running the
...
CFGSimplification pass.
The pass was originally added as a workaround for a LLVM 2.4 bug where debug
info would reference labels that have been optimized away.
2009-02-12 18:39:03 +01:00
Kelly Wilson
6511dc8239
Revert return value swapping on x86_64
2009-02-11 08:32:33 -07:00
Kelly Wilson
707c7bc29f
changes to get the naked asm stuff working for x64
2009-02-10 08:02:25 -07:00
Christian Kamm
a4ca550874
Revert templates to old behavior.
...
While emitting a template instantiation only once is good for compile times
and binary sizes, it doesn't work with linkonce linkage as inlined function
bodies could be discarded. Since we don't want to inhibit inlining, templates
are reverted to the previous behavior, where an instantiation is emitted for
each module using it.
In the future, a custom inlining pass may allow us to switch back to
common/weak linkage and reenable smart template instance emission.
2009-02-08 21:44:46 +01:00
Christian Kamm
789eefd943
Switch some getModule to getCompilationModule to make sure templates are
...
emitted in the right module.
2009-02-08 18:51:32 +01:00
Christian Kamm
7c93355672
Mostly rewrite debug info generation in terms of llvm/Analysis/DebugInfo.h.
...
Add getCompilationModule to Dsymbol and fix template compile unit decision code.
Runtime compiles with -g again.
2009-02-08 16:50:22 +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
3f7c7c5327
Fixed accessing function symbols from inline asm.
...
Ran x86(-64) asm processors through a code formatter.
2009-02-08 05:14:24 +01:00
Tomas Lindquist Olsen
54c3e2cf0c
Reverted the template instantiation changes from rev [940]. Wasn't safe it seems :(
2009-02-05 18:17:42 +01:00
Tomas Lindquist Olsen
319e058410
Reverted back to the LLVM_InlineAsm_X86 versions, a few more things still needs to be sorted out first.
2009-02-04 20:47:27 +01:00
Christian Kamm
ab521c06ff
LDC should follow the D ABI now. Switch back from LLVM_InlineAsm_X86 to
...
D_InlineAsm_X86.
2009-02-04 18:51:11 +01:00
Tomas Lindquist Olsen
9bd52922bd
Changed the way LDC determines if a template instantiation needs to get a definition, seems to speed up compile times quite a bit in some cases.
2009-02-04 18:48:03 +01:00
Christian Kamm
a1e6510c39
Automated merge with http://hg.dsource.org/projects/ldc
2009-02-04 18:39:39 +01:00
Christian Kamm
c3cdcab8d2
Convert struct arg to integer when passing inreg to make sure LLVM doesn't
...
ignore the attribute!
2009-02-04 18:39:33 +01:00
Tomas Lindquist Olsen
1e8eae2e5d
Fixed warning on osx as per request from mwarning.
2009-02-04 16:02:05 +01:00
Tomas Lindquist Olsen
7d2a0a84a7
Removed some dead code.
...
Fixed assertion filenames for imported template instances. Fixes #152 .
2009-02-04 02:10:23 +01:00
Kelly Wilson
6cd6ddd237
Fixed an accidental code removal for osx
2009-02-03 17:27:01 -07:00
Tomas Lindquist Olsen
584911ad4e
Fixed problem with static ctors, in templated imported classes, not begin run. Fixes #203
2009-02-04 00:50:04 +01:00
Tomas Lindquist Olsen
bd4f7ec731
Replace assertion with errormessage for unsupported calling conventions. like Pascal. See dstress/run/e/extern_10_A.d
2009-02-04 00:04:09 +01:00
Tomas Lindquist Olsen
280be5ef8e
Fixed dstress/run/a/array_initialization_17_A.d regression. default initialized static array elements in a constant static array initializer was getting incorrect values.
...
Fixed minor version problem in mini/naked_asm4.d test case.
2009-02-03 23:48:47 +01:00
Christian Kamm
c1aeab8c07
Automated merge with http://hg.dsource.org/projects/ldc
2009-02-03 21:46:54 +01:00
Christian Kamm
bbcea86cf2
Follow the D ABI and pass the last arg in a register if it is a struct that fits.
2009-02-03 21:46:46 +01:00
Kelly Wilson
4ab57fab42
Changed this file to add 'naked' and a couple other missing instructions
2009-02-03 12:43:03 -07:00
Kelly Wilson
e033781188
Added X86-64 version. Needed significant changes.
2009-02-03 12:35:00 -07:00
Kelly Wilson
fe5c047568
Added X86-64 versioning
2009-02-03 12:34:12 -07:00
Kelly Wilson
d969e0b1cb
Added X86-64 version
2009-02-03 12:33:42 -07:00
Kelly Wilson
be38aa3e3a
Added X86-64 versioning
2009-02-03 12:33:21 -07:00
Tomas Lindquist Olsen
9705b7e017
Fixed problem accessing global variables from naked asm on osx.
2009-02-03 18:42:25 +01:00
Tomas Lindquist Olsen
e7125498e2
Added support for naked asm on OSX. (hopefully!)
2009-02-03 18:14:30 +01:00
Christian Kamm
aa2cd42536
Apply naked changes of [920] to dmd2/
2009-02-03 18:11:39 +01:00
Christian Kamm
8726eefefa
Apply StaticStructInit changes from [913] to dmd2/
2009-02-03 18:00:17 +01:00
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
Tomas Lindquist Olsen
8ab98dad49
Fixed assertion failure when object.d is missing the ModuleInfo class
2009-02-02 02:35:44 +01:00
Tomas Lindquist Olsen
75591b3c16
Changed templates and typeinfo to use linkonce linkage instead of weak linkage, this should fix inlining problems, fixing bug #197 . If problems show up, it's easy to change it back by changing the define in mars.h . I'm 95% sure this is safe, given how we handle templates.
2009-02-02 01:44:51 +01:00
Tomas Lindquist Olsen
9b85a345e9
Removed use of TARGET_LINUX and replaced with POSIX, fixes bug [172]
2009-02-02 00:58:36 +01:00
Tomas Lindquist Olsen
e0246fb8cd
Renamed Rebuild profile to match DSSS and Tango convention.
2009-02-02 00:34:22 +01:00
Tomas Lindquist Olsen
98974b02c0
Fix bug #199
2009-02-02 00:26:32 +01:00
Tomas Lindquist Olsen
e6ef3ecf15
Fixed bug #191 by rewriting DtoConstArrayInitializer, patch unfortunately caused regressions, hopefully this doesn't :P
2009-02-01 23:30:36 +01:00
Christian Kamm
01f19c466c
Fix #198 and #199 by making CTFE on static struct initializers work.
...
Renamed SymbolDeclaration to StaticStructInitDeclaration to make its usage clearer.
2009-02-01 20:20:56 +01:00
Christian Kamm
07649678db
_d_delarray also had one of the array consistency asserts mentioned in #184
...
and dmd2632.
2009-01-30 07:51:50 +01:00
Christian Kamm
d3f44831dc
Fix typo in [909].
2009-01-29 17:59:25 +01:00
Christian Kamm
d958535969
Remove asserts on array consistancy in arraysetlength. Fixes #184 , thanks Deewiant.
2009-01-29 17:45:12 +01:00
Christian Kamm
f2ce0df11c
Port some LDC1 portability fixes to LDC2. Fixes #196 .
2009-01-29 17:19:48 +01:00
Christian Kamm
c433e6fbbb
Apply patch for #193 . Thanks fvbommel.
2009-01-29 16:56:48 +01:00
Christian Kamm
9c197b777b
Add testcase for #189 to mini tests.
2009-01-25 12:38:29 +01:00
Christian Kamm
f82ca73c76
Casts from interface to class generally need to be dynamic. Fixes #189 .
2009-01-25 12:35:11 +01:00
Christian Kamm
921a326865
Applied doob's patch to port GDC's Dyld data segment tracking for Mac.
2009-01-24 00:33:06 +01:00