[llvm-commits] [llvm-gcc-4.2] r48608 - in /llvm-gcc-4.2/trunk/gcc: config/i386/llvm-i386-target.h config/i386/llvm-i386.cpp config/rs6000/llvm-rs6000.cpp config/rs6000/rs6000.h llvm-abi.h llvm-convert.cpp
Duncan Sands
baldrick at free.fr
Mon Mar 31 05:39:29 PDT 2008
> while cleaning up the call argument part, I discovered an existing bug.
> Compiling SingleSource/UnitTests/Vector/SSE/sse.isamax.c on x86-32 linux
> gives the assertion
>
> cc1: Instructions.cpp:258: void llvm::CallInst::init(llvm::Value*, llvm::Value* const*, unsigned int): Assertion `(NumParams == FTy->getNumParams() || (FTy->isVarArg() && NumParams > FTy->getNumParams())) && "Calling a function with bad signature!"' failed.
>
> The reason is that @llvm.x86.sse.movmsk.ps is declared as
>
> declare i32 @llvm.x86.sse.movmsk.ps(<4 x float>) nounwind readnone
>
> but the vector is being passed in integer registers in the call, namely
> as two i64's.
How about giving DefaultABI a isBuiltin parameter, not just
HandleReturnType, and use that for parameters? That said, since
builtins really have their own ABI, maybe the right thing to do
is to introduce a new ABI template for use with builtins rather
than complicating DefaultABI. Not sure it's worth it though.
Ciao,
Duncan.
More information about the llvm-commits
mailing list