# HG changeset patch # User Frits van Bommel # Date 1237766515 -3600 # Node ID f2f13f111e2ed56f941d220f6c8c35c50409dc9e # Parent 30663babccff0996b026716f81ff5e7908e0f564 Workaround for LLVM PR 3861 (http://llvm.org/PR3861). (LLVM abort()s in codegen if the second integer in a return value is <= i8 on x86/x86-64) This was breaking native compilation of Tango's TempFile module on x86-64. diff -r 30663babccff -r f2f13f111e2e gen/abi-x86-64.cpp --- a/gen/abi-x86-64.cpp Sun Mar 22 14:51:03 2009 +0100 +++ b/gen/abi-x86-64.cpp Mon Mar 23 01:01:55 2009 +0100 @@ -400,6 +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 ) + // Rather than complicating shouldPassStructInRegs(), just disallow + // second integers for now. + state.ints = 1; + #endif return shouldPassStructInRegs(st, state); }