Commit Graph
946 Commits
Author SHA1 Message Date
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
Christian Kamm 343b80e718 Fix bug #177 by not attempting to define composite debug info for
forward-declared structs.
2009-01-23 13:41:03 +01:00
Christian Kamm 783ec2799d Further Solaris data segment detection fixes. Thanks BlueZeniX! 2009-01-23 10:13:27 +01:00
Christian Kamm 287fa3446c Add -m64 switch to gcc calls on 64-bit platforms. 2009-01-23 10:12:57 +01:00
Christian Kamm 320c22810a Fix #174. 2009-01-22 21:46:40 +01:00
Christian Kamm ab9b9cc2e9 Solaris compatibility and proc map parsing #183, thanks BlueZeniX! 2009-01-22 18:53:32 +01:00
Christian Kamm f4f5c58a44 Add wilsonk's static data segment finding code for x86-64 from #181. Thanks! 2009-01-22 18:23:30 +01:00
Christian Kamm ba9eb478dd Add headers for HP's libunwind, currently unused though. 2009-01-22 17:57:38 +01:00
Christian Kamm bbf21853b4 Fix x86-64 exception handling #180. Thanks pcwalton! 2009-01-22 17:50:38 +01:00
Tomas Lindquist Olsen 343003cfdc Makes sure only function definitions inside templates get weak linkage, llvm doesn't allow weak linkage on just declarations, so we use external linkage for those. Fixes #162 2009-01-22 17:26:50 +01:00