Commit Graph

  • d0a8ee9573 Return null from a static class to interface cast if the class reference was null. Fixes #237. Frits van Bommel 2009-03-20 15:50:01 +01:00
  • e242f81475 Fix makewebstatistics: don't try to drop a test multiple times. Frits van Bommel 2009-03-20 15:47:42 +01:00
  • d1911d40d6 Fix some issues with fawzi's patch. - It now actually compiles: - import stdc.stdio for string formatting functions) - remove extra '{' - Use snprintf() instead of sprintf(). - Use return value from snprintf instead of strlen(). - Don't print the filename in Exception.writeOut() if it has zero length and the line number is 0 (It would previously only skip these if the filename was null, but not if it was a different empty string) - Ignore empty filename + line number 0 in FrameInfo.writeOut() as well. Frits van Bommel 2009-03-18 15:33:19 +01:00
  • e847f60fb1 Apply fawzi's patch from #235. This has some issues which are addressed in my next commit. Frits van Bommel 2009-03-18 15:20:07 +01:00
  • 434cb74980 Fix a bug where ::warning() was called with a va_list argument instead of an actual vararg list. Also cleaned up the format for warnings. (Previously some would start with "warning - warning - Warning:" which was a bit redundant) Frits van Bommel 2009-03-18 15:03:17 +01:00
  • d9f9da4521 Don't set LLVM_REV if it's set on the command line. Frits van Bommel 2009-03-18 00:25:36 +01:00
  • bb0eab009d Fix imports copying for out-of-source build. Christian Kamm 2009-03-15 23:04:58 +01:00
  • d6bb243ff5 Apply [1120] to D2 as well (untested). Frits van Bommel 2009-03-15 16:57:44 +01:00
  • bc9fae17a8 Another "pointers are 32 bits" issue in the frontend. long/ulong constants cast to pointers were truncated to 32-bit values. Frits van Bommel 2009-03-15 15:58:38 +01:00
  • 80e8ea4792 Fix -g with default ldc.conf Frits van Bommel 2009-03-14 22:44:52 +01:00
  • 3ffaa5c914 Make this test a bit more meaningful Frits van Bommel 2009-03-14 22:29:31 +01:00
  • b237079854 Fun with parameter attributes: For several of the "synthetic" parameters added to D functions, we can apply noalias and nocapture. They are sret parameters, 'nest' pointers passed to nested functions, and _argptr: Nocapture: - Sret and nest are nocapture because they don't represent D-level variables, and thus the callee can't (validly) obtain a pointer to them, let alone keep it around after it returns. - _argptr is nocapture because although the callee has access to it as a pointer, that pointer is invalidated when it returns. Frits van Bommel 2009-03-14 22:15:31 +01:00
  • 457ccf751a Disable this for -release, -disable-boundscheck, etc. Frits van Bommel 2009-03-14 01:32:10 +01:00
  • 85a3433791 Call _d_array_bounds when an associative array is indexed with a non-existent key (unless it's being assigned to). Closes #233. Frits van Bommel 2009-03-14 01:22:05 +01:00
  • 1e6bd8f8e8 Hopefully fix #232 Frits van Bommel 2009-03-13 19:22:40 +01:00
  • ad46ec8bd0 Split out LLVM_REV into separate header, to reduce rebuilding when only the LDC revision has changed. Frits van Bommel 2009-03-13 16:18:43 +01:00
  • a23861d3c1 Updating revisions.pl.in: - Change the way the LLVM SVN revision is detected, using svn info instead of svnversion. This speeds it up significantly on my machine (especially when the LLVM SVN checkout isn't in disk cache). - Add "last changed date" to SVN checkouts too, not just unpacked tarballs - No longer rely on SVN revision to detect release vs trunk checkouts, treat release checkout the same as unpacked release tarball. (Except for date determination, which uses SVN date instead of filesystem date) Frits van Bommel 2009-03-13 16:18:01 +01:00
  • 2a396614ad Fix 32bit "+2" typo for Outbuffer::reserve Kelly Wilson 2009-03-13 07:17:29 -06:00
  • ff33ed6d74 Revert removal of "+2" from Outbuffer::reserve function for x64. Unless somone can fix this properly, then the "+2" must stay in or tango won't build. Kelly Wilson 2009-03-12 17:10:24 -06:00
  • 8b185b8b6a Fix field access from inline asm. See tests/mini/asm10.d Frits van Bommel 2009-03-12 23:48:43 +01:00
  • ed9af11856 Apply r1106 to x86-64 asm too Frits van Bommel 2009-03-12 23:31:26 +01:00
  • 3fe4cfb0fa Unquote ${LIBCONFIG_LDFLAGS} in target_link_libraries(). Without this change, LDC fails to link for me. Frits van Bommel 2009-03-12 23:30:58 +01:00
  • 4399ff3700 Corrected bad asm match for fstp on x86-32 Tomas Lindquist Olsen 2009-03-12 23:12:36 +01:00
  • 269e37dc88 - Fixed building tango-user-ldc on x86-32. Tomas Lindquist Olsen 2009-03-12 22:30:30 +01:00
  • 43a070b0d3 Removed plain wrong note from ldc.conf.in, I never implemented that! Tomas Lindquist Olsen 2009-03-12 21:04:27 +01:00
  • 8b751cce0e - Updated to DMD frontend 1.041. - Removed dmd/inifile.c , it's not under a free license, replaced with libconfig based config file. Tomas Lindquist Olsen 2009-03-12 20:37:27 +01:00
  • ff354d59b2 Use stringstream in asm generation instead of OutBuffer. Besides looking better, this should reduce allocations and copying. Frits van Bommel 2009-03-12 14:08:57 +01:00
  • c1bd2234a9 Clean up asm code a bit. - Use vector instead of Array, reducing allocations. - Use vectors instead of deques since we only push_back and index. - Remove redundant typedefs of iterators. - Comment out unused variable (used only in commented-out GDC code). - A few whitespace changes. Frits van Bommel 2009-03-12 14:08:57 +01:00
  • 723ae9f9d5 Fix an error in the ASM tables introduced by the recent fistp fixes. (There are only 3 fields for operands) Frits van Bommel 2009-03-12 14:08:57 +01:00
  • 557345ac2a Delete tango.patch, it has been applied in the Tango repository. Frits van Bommel 2009-03-11 19:04:51 +01:00
  • 6e44efb9d2 Logic error fix Kelly Wilson 2009-03-11 13:54:29 -04:00
  • e5a4e4cb41 Fix FS:4 problem for x32 Kelly Wilson 2009-03-11 12:13:41 -04:00
  • 15a19c738f Fix FS:4 miswrite due to earlier changes for a constant displacement Kelly Wilson 2009-03-11 09:16:41 -06:00
  • 8bb206447f Add missing EBX clobber to CPUID asm instruction. Frits van Bommel 2009-03-11 14:17:13 +01:00
  • cff2c92fd3 Change faulty offset for asm in Cache.d (ie. change "-20(%rbp)+4)" to "4+-20(%rbp)") Kelly Wilson 2009-03-11 00:08:45 -04:00
  • 85090ef9c9 Change x64 asm in Cache.d from a positive offset from after rbp "-20(%rbp)+4" to before "4+-20(%rbp)" Kelly Wilson 2009-03-10 22:02:11 -06:00
  • 40887efe59 Fix for x32 fmul/div/add/sub with no operands. Kelly Wilson 2009-03-10 20:40:22 -04:00
  • 58d34a9660 Fix for fmul/div/add/sub with no operands. Revert explicit ST0 definition since a typo had caused the need for that. Kelly Wilson 2009-03-10 18:34:19 -06:00
  • 475061ffeb Merge Frits van Bommel 2009-03-11 01:01:40 +01:00
  • 2d11484649 fix fistp properly for x32 Kelly Wilson 2009-03-10 13:59:50 -04:00
  • d13e841511 Merging Kelly Wilson 2009-03-10 11:08:35 -06:00
  • e59c7db637 Properly fix fistp for x64 Kelly Wilson 2009-03-10 11:06:38 -06:00
  • 5bb81ac3d2 Fix 32bit version of "jle short Label;" for 'short' or 'long'. Unknown 2009-03-10 09:13:13 -04:00
  • 0d2e665fc4 Fix for dual operand form of fistp, also make reg ST(0) explicit and fix lindquists previous code that allowed dual operand form of fstp but dissallowed the single operand form accidently Kelly Wilson 2009-03-10 06:23:26 -06:00
  • 3f89a04f27 Make sure instantiations of template intrinsics are marked as intrinsics. Frits van Bommel 2009-03-10 12:12:24 +01:00
  • 5e95a6640e Move "invalid intrinsic name" error to declaration, not instantiation. Frits van Bommel 2009-03-10 11:30:51 +01:00
  • d1bea3d6c0 Update testcase broken by intrinsics changes. Frits van Bommel 2009-03-10 10:46:15 +01:00
  • 99aefd93c5 Oops, had some unsaved changes Frits van Bommel 2009-03-10 04:56:28 +01:00
  • 613a3b71fd Automated merge with http://hg.dsource.org/projects/ldc Frits van Bommel 2009-03-10 04:48:54 +01:00
  • 5d9bd5d139 Intrinsics overhaul: - More error checking for pragma(intrinsic) - Properly handle templating for real (use actual nr of bits, not .sizeof * 8) - Template all .i* and .f* intrinsics - The old names are deprecated aliases now Frits van Bommel 2009-03-10 04:45:32 +01:00
  • da7fdb94f7 Fix for asm { jle short Lret; }, used by Tango since dmd accepts the 'short'. We just throw the 'short/long' away right now. Kelly Wilson 2009-03-09 20:11:42 -06:00
  • 9bbab8a342 Change the way imports are copied to the (Tango) runtime dir. Frits van Bommel 2009-03-09 21:38:31 +01:00
  • 545d85a057 Reformat intrinsics.di a bit. Frits van Bommel 2009-03-09 21:38:24 +01:00
  • 7ccbe58e08 Factor out some common code between X86 and X86_64, and supply *_real versions of all floating point intrinsics that exist whether reals are 80-bit or 64-bit. Frits van Bommel 2009-03-09 21:38:06 +01:00
  • a2bb3ce6a2 Make sure revisions.pl always runs so revisions.h doesn't get out of date. Frits van Bommel 2009-03-09 16:25:45 +01:00
  • c1d9694494 Work around llvm bug #3749 better, or not at all if using a fixed llvm revision. Frits van Bommel 2009-03-09 13:29:25 +01:00
  • 0182641f85 Ignore the ABI some more for intrinsics Frits van Bommel 2009-03-09 03:44:11 +01:00
  • c5c0a01044 Fix out of source build by adding the build dir to the include path. Christian Kamm 2009-03-08 17:57:34 +01:00
  • f05ee632bb Automated merge with http://hg.dsource.org/projects/ldc Christian Kamm 2009-03-08 17:51:45 +01:00
  • 958ad381db Fix to make sure to create gen/ in build dir and unbreak build with older perl Frits van Bommel 2009-03-08 16:37:55 +01:00
  • c49642a08f Make CompileUnit linkage compatible with llvm trunk. Christian Kamm 2009-03-08 16:30:39 +01:00
  • fc5f35c410 Automated merge with http://hg.dsource.org/projects/ldc Christian Kamm 2009-03-08 16:22:06 +01:00
  • 13e83bf1c1 Improved template emission control for singleobj building. Christian Kamm 2009-03-08 16:21:56 +01:00
  • 520bc229ea Give compile units LinkOnceLinkage to circumvent duplicate symbols with LLVM linking. Christian Kamm 2009-03-08 16:21:11 +01:00
  • 622a93a810 Make LDC work with LLVM trunk (s/LinkOnceLinkage/LinkOnceOdrLinkage/) Also moved the #defines for linkage types into a separate header instead of mars.h so we can #include revisions.h without having to rebuild the entire frontend every time we update. (I'm using revisions.h to get the LLVM revision for use in preprocessor conditionals. It should work with LLVM release 2.5, old trunk and new trunk) Frits van Bommel 2009-03-08 16:13:10 +01:00
  • 532cccbd3a Fixed some #includes to be correct for both D1 and D2 Frits van Bommel 2009-03-08 12:13:22 +01:00
  • cc12db505e Make error message on assembler failure more informative (hopefully) Frits van Bommel 2009-03-08 11:46:55 +01:00
  • dc20834473 Update runtime CMakeList.txt for new command line syntax regarding PIC Frits van Bommel 2009-03-08 09:58:26 +01:00
  • 302990a0ba Remove a dead variable from ldmd. (It used to be used to pass an extra -help to ldc when no files were specified, but we handle that in ldc itself now) Frits van Bommel 2009-03-08 09:57:20 +01:00
  • d8c89ce681 really fixed fstp a, b; on x86-64 Tomas Lindquist Olsen 2009-03-08 04:23:44 +01:00
  • 9a5350afb1 Applied rev two operand form fstp fix to x86-64 asm Tomas Lindquist Olsen 2009-03-08 02:46:37 +01:00
  • 341dfe7a9f Merge Tomas Lindquist Olsen 2009-03-08 02:36:45 +01:00
  • 16668d1508 Fixed two operand form of X86 fstp instruction. (throw away second operand!) Tomas Lindquist Olsen 2009-03-08 02:36:09 +01:00
  • 59f677c7ae Apply [1053] to x86-32 asm as well. Frits van Bommel 2009-03-08 02:07:53 +01:00
  • 941ccdfdc3 Future-proof the code to classify static array members of structs. Frits van Bommel 2009-03-08 01:26:30 +01:00
  • 2687d58198 Always pass an address expression (not a var expression) to asm operands of type Arg_Memory. Frits van Bommel 2009-03-08 00:57:58 +01:00
  • 95f12f04f1 Add '-singleobj' command line switch that will tell LDC to link LLVM modules internally and only emit a single object file. Christian Kamm 2009-03-07 19:38:00 +01:00
  • ed9591d81f Make IrFuncTy a member of TypeFunction. Reset between modules compiled in the same LDC call. Christian Kamm 2009-03-07 14:25:30 +01:00
  • 5af82ee8d3 Fix a bug in the X86 ABI. The size of a struct is different from the size of a pointer to that struct... Frits van Bommel 2009-03-06 21:15:13 +01:00
  • 1c6c4bc361 Two small bugfixes: - See through typedefs and enums in passByVal - Don't depend on TypeFunction::parameters->dim being the actual number of parameters; it contains unexpanded tuples as single elements. Frits van Bommel 2009-03-06 19:12:48 +01:00
  • 3e15c659d1 Fix a typo Frits van Bommel 2009-03-06 17:00:34 +01:00
  • 27d3ab4546 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. Frits van Bommel 2009-03-06 16:00:47 +01:00
  • 79bc6230df Add 'testversion=Tango' to rebuild profile. Frits van Bommel 2009-03-05 21:32:18 +01:00
  • b8e9d554e5 Fixed lazy arguments again. Tomas Lindquist Olsen 2009-03-05 18:33:20 +01:00
  • cc612c7290 Fix hasUnalignedFields(): take static arrays into account too. Frits van Bommel 2009-03-04 23:17:32 +01:00
  • d257890e29 Fix bug in default implementation of ABIRewrite::getL. Frits van Bommel 2009-03-04 23:06:23 +01:00
  • 65ba1d4d88 Updated ABI handling to be more flexible with regard to reusing lvalues and allocating fewer temporaries. Tomas Lindquist Olsen 2009-03-04 17:24:25 +01:00
  • ca41cb29d9 Added some documentation for the IrFuncTyArg structure, which is key to writing ABI transformations. Tomas Lindquist Olsen 2009-03-04 16:13:16 +01:00
  • f25bbe3d09 Fixed inreg attribute to no longer overwrite sign/zeroext. Tomas Lindquist Olsen 2009-03-03 21:20:20 +01:00
  • f84a2fb84a Updated lifetime.d with a 32bit faster codepath for overflow checks. Tomas Lindquist Olsen 2009-03-03 19:47:39 +01:00
  • d845b11dbd Removed inline asm for overflow checking in runtime that wasn't working. Tomas Lindquist Olsen 2009-03-03 19:37:47 +01:00
  • bb495c6e40 remove memory clobber again ... Tomas Lindquist Olsen 2009-03-03 19:27:23 +01:00
  • ae214b18e7 Added ~{memory} clobber when a jump_target is generated in inline asm (branch out of inline asm) Tomas Lindquist Olsen 2009-03-03 19:18:47 +01:00
  • f0d33b1b20 Move more tests to D_InlineAsm Christian Kamm 2009-03-03 19:03:27 +01:00
  • e59ba75553 Adjust mini tests to use D_InlineAsm Christian Kamm 2009-03-03 18:26:39 +01:00
  • a3bc6ce3f9 Switch LLVM_InlineAsm -> D_InlineAsm. It's for real this time, hopefully. Christian Kamm 2009-03-03 17:44:56 +01:00
  • 9433028acd Remove unused defines: X86_REVERSE_PARAMS, X86_PASS_IN_EAX Christian Kamm 2009-03-03 17:38:08 +01:00
  • 8ce5a07fc0 Fixed potential assertion failure in taking address of function as a constant expression. Tomas Lindquist Olsen 2009-03-03 17:27:14 +01:00
  • fdecec122a Disabled some extensive LLVM value logging with -vv that dramatically increases -vv output length for little value. Tomas Lindquist Olsen 2009-03-03 17:21:35 +01:00
  • c3a53c0128 Added hasUnalignedFields helper to check if a type has unaligned fields - as per request from fvbommel. Result is cached in TypeStruct. Tomas Lindquist Olsen 2009-03-03 15:08:26 +01:00