# HG changeset patch # User Frits van Bommel # Date 1237859217 -3600 # Node ID 152bd2c804d071af77d0dc6f67831cb28d1a390f # Parent eeb8b95ea92efe0f545b4a6f05802c3a82697f46 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?) diff -r eeb8b95ea92e -r 152bd2c804d0 gen/abi-x86-64.cpp --- 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 ) + #if 1 //LLVM_REV < 67588 + // LLVM before trunk r67588 doesn't allow a second int to be an i1 or + // i8. (See ) // 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);