224 Commits

Author SHA1 Message Date
Kelly Wilson
23919b4de4 fix assembly code for mingw32 in minitests 2009-05-31 11:01:02 -06:00
Frits van Bommel
46cd6504fa Adjust some more code that was depending on the function and delegate calling
conventions being equal.
There's also an instance in `tango.text.convert.Layout` that should be adjusted:
{{{
Index: tango/text/convert/Layout.d
===================================================================
--- tango/text/convert/Layout.d	(revision 4578)
+++ tango/text/convert/Layout.d	(working copy)
 -660,8 +660,12 @@

                        case TypeCode.STRUCT:
                             auto s = cast(TypeInfo_Struct) type;
-                            if (s.xtoString)
-                                return Utf.fromString8 (s.xtoString(p), result);
+                            if (s.xtoString) {
+                                char[] delegate() toString;
+                                toString.ptr = p;
+                                toString.funcptr = cast(char[] function()) s.xtoString;
+                                return Utf.fromString8 (toString(), result);
+                            }
                             goto default;

                        case TypeCode.INTERFACE:
}}}
2009-05-31 15:27:01 +02:00
Kelly Wilson
2e6e578ea1 Fix test for mingw 2009-05-30 14:57:48 -06:00
Kelly Wilson
e35b95f35e merging 2009-05-29 01:09:38 -06:00
Kelly Wilson
01c608f457 Fix - add Path.native for mingw support...thanks mp4/jaffa 2009-05-29 01:08:39 -06:00
Christian Kamm
5d4fe64ac2 Get rid of old phobos-based tests. 2009-05-28 22:00:08 +02:00
Frits van Bommel
b06fa1f05e I ran into another issue like the one fixed by r1318, so update all of
`tests/mini/norun_debug*` to hopefully keep crashing using the same trick.
2009-05-28 02:28:30 +02:00
Christian Kamm
2665fc4f3c Add test from #308 to minitests. 2009-05-23 00:26:38 +02:00
Frits van Bommel
adfc5b3ee9 Fix scope(exit) foreach (ref v; arr) foo(v); 2009-05-22 21:38:01 +02:00
Frits van Bommel
95c35225bb Don't print the entire declaration of the alliassee when ->toChars() is
called on an `AliasDeclaration`; just printing the name will do. This fixes
#305, which otherwise tries to generate
{{{
  class E {
      void A() {
          alias /* recurse into E->toCBuffer() */ m;
      }
  }
}}}
by way of an infinite recursion (causing a segfault when the stack runs out).
2009-05-20 16:20:59 +02:00
Frits van Bommel
ea4690128b Merge some changes from Tango's object.di into the testincludes version. 2009-05-19 22:35:08 +02:00
Frits van Bommel
541f3723cd Intrinsics shouldn't see struct padding, so use a special TargetABI for them
that removes it.
This unbreaks the `llvm_*_with_overflow` intrinsics.
2009-05-16 13:06:49 +02:00
Tomas Lindquist Olsen
ea00a120e9 Added testcase for #288 . 2009-05-10 14:37:30 +02:00
Frits van Bommel
039edd5cd4 Make sure this testcase keeps crashing with -O3.
Recent optimization improvements made LLVM realize the store-to-null was
unavoidable, so it deleted all of main() and replaced it with 'unreachable'.
Because the body of main() no longer even contained a return instruction,
calling it caused random code to be ran instead. This happened to be the code
that links in the ModuleInfo on my machine, which then returned "successfully".
2009-05-09 00:55:47 +02:00
Christian Kamm
37edd5add6 Fix certain cases of floating point instruction mistranslation. 2009-05-07 21:01:44 +02:00
Christian Kamm
77100f890c Make static int[] a = [1, 2]; a[0] = 4; not segfault
by making the array data ptr a non-const global variable.
2009-05-03 11:16:54 +02:00
Tomas Lindquist Olsen
3bd5cf70c2 Added testcase for overlapping struct default initializer I has missed. Slight tweak of the relevant error message. 2009-04-27 01:43:29 +02:00
Christian Kamm
c6b059ed73 Add (currently failing) test for correct virtual call resolution. 2009-04-26 10:29:39 +02:00
Tomas Lindquist Olsen
f6f12e4241 Added checks for overlapping union initializers, as shown in bug #259 . 2009-04-22 01:18:21 +02:00
Frits van Bommel
909c6dae18 Fix some unittests for 64-bit asm. They were operating on int variables as if
they were longs.
This was causing asm1_1 to fail when compiled with -O3 because it was
overwriting the spilled value of callee-saved register %rbx, which the runtime
was using as a pointer value at the time.
2009-04-13 17:42:36 +02:00
Frits van Bommel
376a825075 Fix a bug in nested context code that occured when calling a function nested in
the outermost scope with a context frame from a function using a more nested
context frame.
2009-04-13 12:19:18 +02:00
Christian Kamm
a6ba7d16b2 Fix mini test runner. 2009-04-12 19:53:41 +02:00
Lars Ivar Igesund
8063e8df9d Ported script to Tango 2009-04-07 18:37:19 +02:00
Tomas Lindquist Olsen
9c4b2b4036 Started seperating type resolution from the rest of codegen again, the merge had too many regressions. 2009-04-03 16:34:11 +02:00
Frits van Bommel
3f49ddb6d5 Fix nested references to 'ref' foreach variables.
These "walk around" the array being iterated over, so they're a bit trickier
than other variables to get right.
2009-04-01 00:01:44 +02:00
Frits van Bommel
b7ca040f7c Fix a bug I noticed. Varargs were broken if preceded by tuple parameters. 2009-03-30 00:00:43 +02:00
Tomas Lindquist Olsen
e61562033d Added support for tuple return with __asmtuple!(int,int) etc. 2009-03-28 08:25:58 +01:00
Frits van Bommel
91698fd0a5 Remove a duplicate minitest 2009-03-25 13:46:49 +01:00
Christian Kamm
a0d93e699a Automated merge with http://hg.dsource.org/projects/ldc 2009-03-24 14:34:16 +01:00
Christian Kamm
eb1deec50d Fix #239. 2009-03-24 14:33:57 +01:00
Frits van Bommel
143e95680f Remove struct padding which was making this test fail on 64-bit systems. 2009-03-24 03:14:22 +01:00
Christian Kamm
372b40dd94 Fix tuple declarations in aggregates. 2009-03-23 14:47:51 +01:00
Frits van Bommel
e242f81475 Fix makewebstatistics: don't try to drop a test multiple times. 2009-03-20 15:47:42 +01:00
Frits van Bommel
3ffaa5c914 Make this test a bit more meaningful 2009-03-14 22:29:31 +01:00
Frits van Bommel
8b185b8b6a Fix field access from inline asm. See tests/mini/asm10.d 2009-03-12 23:48:43 +01:00
Frits van Bommel
d1bea3d6c0 Update testcase broken by intrinsics changes. 2009-03-10 10:46:15 +01:00
Christian Kamm
f0d33b1b20 Move more tests to D_InlineAsm 2009-03-03 19:03:27 +01:00
Christian Kamm
e59ba75553 Adjust mini tests to use D_InlineAsm 2009-03-03 18:26:39 +01:00
Tomas Lindquist Olsen
61dfb11bc5 - Fixed x86-32 C ABI for complex number return values.
- Removed unused code from the ABI class.
2009-03-01 19:01:05 +01:00
Frits van Bommel
03ce6604a0 Fix cfloat return on x86_64: only perform ABI transformation for non-extern(D)
functions.
There's no need to waste cycles with extern(D), which we get to define
ourselves. Fixes tests/mini/asm8.d. (Since the asm abiret code already assumed
{xmm0, xmm1} returns)
2009-02-26 23:35:39 +01:00
Frits van Bommel
1a155e6439 Fix dstress runner to use ldmd 2009-02-26 14:49:32 +01:00
Frits van Bommel
9ab133963d Update some testcases now that 64-bit immediates are working. 2009-02-18 23:18:34 +01:00
Frits van Bommel
e3d6b1c051 Fix some assembler issues:
The assembler was miscompiling "add" (specifically, the "add reg/mem, imm"
variations).
The change that caused this seems to have been made because without it, some
"add"s didn't compile at all.

This patch reverts the previous change, and makes sure assembler operands are
remapped correctly even though the input operands auto-generated due to
updating operations aren't explicitly used.
2009-02-18 21:46:14 +01:00
Christian Kamm
f62df176d6 Allow 'return exp;' for void main().
It's unfortunate that for main the llvm type and D type don't match up...
2009-02-17 18:53:15 +01:00
Frits van Bommel
9186ee8935 Fix {,w,d}char handling in tests/mini/vararg6.d:print() 2009-02-16 19:31:10 +01:00
Christian Kamm
913669eab5 Fix test on x86-32. 2009-02-16 19:17:15 +01:00
Frits van Bommel
347cfc419d Some changes I missed in my last commit (wound up in wrong patch file) 2009-02-16 01:43:14 +01:00
Frits van Bommel
2dec6aeb41 Implement implicit return after inline asm on x86_64 2009-02-15 18:04:22 +01:00
Kelly Wilson
707c7bc29f changes to get the naked asm stuff working for x64 2009-02-10 08:02:25 -07: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