Mercurial > projects > ldc
changeset 1346:6f4154b318ef
Remove an old workaround that was kept around for ABI-compatibility on x86-64
between different LLVM versions.
This means LLVM r67588 is required if you want to compile for x86-64, otherwise
the backend will assert when you try to return e.g. struct { int i; char c; }
from a function. (In particular, this is no longer compatible with LLVM 2.5)
It also means that any code returning small structs on x86-64 will probably
need to be recompiled in order to be linkable to code compiled with this change.
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Tue, 12 May 2009 15:50:48 +0200 |
parents | 712662f45ee4 |
children | 3647bef175d7 |
files | gen/abi-x86-64.cpp |
diffstat | 1 files changed, 0 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/gen/abi-x86-64.cpp Mon May 11 20:54:25 2009 +0200 +++ b/gen/abi-x86-64.cpp Tue May 12 15:50:48 2009 +0200 @@ -43,7 +43,6 @@ #include "gen/llvmhelpers.h" #include "gen/abi.h" #include "gen/abi-x86-64.h" -//#include "gen/llvm-version.h" // only use is commented out. #include "ir/irfunction.h" #include <cassert> @@ -401,19 +400,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 <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); }