Mercurial > projects > ldc
annotate ldc-posix-tango @ 1047:6bb04dbee21f
Some calling convention work for x86-64:
- Implement x86-64 extern(C), hopefully correctly.
- Tried to be a bit smarter about extern(D) while I was there.
Interestingly, this code seems to be generating more efficient code than
gcc and llvm-gcc in some edge cases, like returning a `{ [7 x i8] }` loaded from
a stack slot from an extern(C) function. (gcc generates 7 1-byte loads, while
this code generates a 4-byte, a 2-byte and a 1-byte load)
I also added some changes to make sure structs being returned from functions or
passed in as parameters are stored in memory where the rest of the backend seems
to expect them to be. These should be removed when support for first-class
aggregates improves.
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Fri, 06 Mar 2009 16:00:47 +0100 |
parents | cc6489f32519 |
children | 8403fec8c34c |
rev | line source |
---|---|
452
30ef3c7bddca
Fixed problems with nested 'this'. Fixes #39 .
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
445
diff
changeset
|
1 ignore=object |
138 | 2 |
663
6aaa3d3c1183
First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents:
660
diff
changeset
|
3 compiler=ldc |
6aaa3d3c1183
First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents:
660
diff
changeset
|
4 inifile=ldc.conf |
138 | 5 |
6 exeext= | |
700
716684a0d63f
Updated rebuild profile for .o output as default, compiler needs to be fixed still.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
665
diff
changeset
|
7 objext=o |
138 | 8 |
9 | |
201 | 10 version=LLVM |
663
6aaa3d3c1183
First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents:
660
diff
changeset
|
11 version=LDC |
138 | 12 noversion=DigitalMars |
13 noversion=GNU | |
14 testversion=linux | |
659
43d2ab9833bf
Forgot a change from DMD update.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
655
diff
changeset
|
15 testversion=darwin |
43d2ab9833bf
Forgot a change from DMD update.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
655
diff
changeset
|
16 testversion=freebsd |
138 | 17 testversion=Unix |
443
44f08170f4ef
Removed tango from the repository and instead added a runtime dir with the files needed to patch and build tango from svn.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
437
diff
changeset
|
18 testversion=Posix |
138 | 19 testversion=Windows |
20 testversion=Win32 | |
21 testversion=Win64 | |
659
43d2ab9833bf
Forgot a change from DMD update.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
655
diff
changeset
|
22 testversion=mingw32 |
138 | 23 testversion=X86 |
24 testversion=PPC | |
25 testversion=X86_64 | |
26 testversion=PPC64 | |
27 testversion=D_InlineAsm | |
886
7ddd03a2ce02
Typo fix in rebuild profile. Thanks BlueZeniX.
Christian Kamm <kamm incasoftware de>
parents:
714
diff
changeset
|
28 testversion=D_InlineAsm_X86 |
138 | 29 testversion=D_InlineAsm_PPC |
30 testversion=D_InlineAsm_X86_64 | |
31 testversion=D_InlineAsm_PPC64 | |
660
d6b71647b622
One more update of Tango Rebuild profile.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
659
diff
changeset
|
32 testversion=LLVM_InlineAsm_X86 |
138 | 33 testversion=LittleEndian |
34 testversion=BigEndian | |
35 testversion=LLVM64 | |
660
d6b71647b622
One more update of Tango Rebuild profile.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
659
diff
changeset
|
36 testversion=PIC |
1046
cc6489f32519
Add 'testversion=Tango' to rebuild profile.
Frits van Bommel <fvbommel wxs.nl>
parents:
986
diff
changeset
|
37 testversion=Tango |
138 | 38 |
39 | |
40 [compile] | |
714
1e98c99a87cb
Updated Rebuild profile to use correct linker switches
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
700
diff
changeset
|
41 oneatatime=yes |
986
a8cb25d478c4
Use LLVM-style command line (instead of DMD-style)
Frits van Bommel <fvbommel wxs.nl>
parents:
916
diff
changeset
|
42 cmd=ldmd -c $i |
138 | 43 |
44 flag=$i | |
45 incdir=-I$i | |
714
1e98c99a87cb
Updated Rebuild profile to use correct linker switches
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
700
diff
changeset
|
46 libdir=-L-L$i |
138 | 47 optimize=-O3 |
48 version=-version=$i | |
49 | |
50 | |
51 [link] | |
527
cecfee2d01a8
Added support for overloaded intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
452
diff
changeset
|
52 oneatatime=yes |
663
6aaa3d3c1183
First part of rename to LDC.
Christian Kamm <kamm incasoftware de>
parents:
660
diff
changeset
|
53 cmd=ldc $i -of$o |
138 | 54 |
714
1e98c99a87cb
Updated Rebuild profile to use correct linker switches
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
700
diff
changeset
|
55 libdir=-L-L$i |
1e98c99a87cb
Updated Rebuild profile to use correct linker switches
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
700
diff
changeset
|
56 lib=-L-l$i |
138 | 57 flag=-L$i |
58 | |
59 | |
60 [liblink] | |
61 safe=yes | |
527
cecfee2d01a8
Added support for overloaded intrinsics.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
452
diff
changeset
|
62 oneatatime=yes |
700
716684a0d63f
Updated rebuild profile for .o output as default, compiler needs to be fixed still.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
665
diff
changeset
|
63 cmd=ar rc $o $i |
138 | 64 |
654
961221d5a49c
Updated llvmdc-tango Rebuild profile, liblink was wrong
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
527
diff
changeset
|
65 libdir= |
961221d5a49c
Updated llvmdc-tango Rebuild profile, liblink was wrong
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
527
diff
changeset
|
66 lib= |
961221d5a49c
Updated llvmdc-tango Rebuild profile, liblink was wrong
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
527
diff
changeset
|
67 flag= |
138 | 68 |
69 | |
70 [postliblink] | |
700
716684a0d63f
Updated rebuild profile for .o output as default, compiler needs to be fixed still.
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
665
diff
changeset
|
71 cmd=ranlib $i |
437
11a8a45759a8
Reverted bad cfg merge stuff
Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
parents:
436
diff
changeset
|
72 |
138 | 73 |
74 [shliblink] | |
75 shlibs=no | |
76 | |
77 [dyliblink] | |
78 dylibs=no |