changeset 1134:152bd2c804d0

Update comments now that LLVM PR3861 has been fixed. However, since conditionally removing the workaround makes the ABI dependent on LLVM version, I reconsidered that. (The same revision of LDC compiling for the same target should probably produce code that follows the same ABI, right?)
author Frits van Bommel <fvbommel wxs.nl>
date Tue, 24 Mar 2009 02:46:57 +0100
parents eeb8b95ea92e
children 8ebbad15fc99
files gen/abi-x86-64.cpp
diffstat 1 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/gen/abi-x86-64.cpp	Mon Mar 23 20:26:33 2009 +0100
+++ b/gen/abi-x86-64.cpp	Tue Mar 24 02:46:57 2009 +0100
@@ -400,13 +400,15 @@
     bool retStructInRegs(TypeStruct* st) {
         // 'fastcc' allows returns in up to two registers of each kind:
         DRegCount state(2, 2, 2);
-    #if 1
-        // TODO: Disable this if and when LLVM PR 3861 gets fixed.
-        
-        // LLVM currently doesn't allow a second int to be an i1 or i8.
-        // (See <http://llvm.org/PR3861>)
+    #if 1 //LLVM_REV < 67588
+        // LLVM before trunk r67588 doesn't allow a second int to be an i1 or
+        // i8. (See <http://llvm.org/PR3861>)
         // Rather than complicating shouldPassStructInRegs(), just disallow
         // second integers for now.
+        // FIXME: Disabling this for older LLVM only makes the abi dependent on
+        //        LLVM revision, which seems like a bad idea. We could extend
+        //        i8 parts to i16 to work around this issue until 2.6...
+        // TODO: Remove this workaround when support for LLVM 2.5 is dropped.
         state.ints = 1;
     #endif
         return shouldPassStructInRegs(st, state);