# HG changeset patch # User Frits van Bommel # Date 1242326456 -7200 # Node ID 701d11a1e7b1f18bde33a3b4078c201122496aaa # Parent 45aca7e7cc88388c2e3faaa103560aad54bd9c38 Re-apply [1346], which was reverted in [1348], now that padding should no longer be a problem. As noted before, this will break ABI-compatibility on x86-64, so recompile old code before linking with newly-compiled code if you're on x86-64. As an added bonus, I actually tested it this time :). diff -r 45aca7e7cc88 -r 701d11a1e7b1 gen/abi-x86-64.cpp --- a/gen/abi-x86-64.cpp Thu May 14 20:36:55 2009 +0200 +++ b/gen/abi-x86-64.cpp Thu May 14 20:40:56 2009 +0200 @@ -44,7 +44,6 @@ #include "gen/abi.h" #include "gen/abi-x86-64.h" #include "gen/structs.h" -//#include "gen/llvm-version.h" // only use is commented out. #include "ir/irfunction.h" #include @@ -402,19 +401,6 @@ bool retStructInRegs(TypeStruct* st) { // 'fastcc' allows returns in up to two registers of each kind: DRegCount state(2, 2, 2); - #if 1 //LLVM_REV < 67588 - // (If uncommenting the LLVM_REV line above, also uncomment llvm-version #include - - // 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); }