[LLVMdev] __float128 (f128) calling convention bug on x86_64
Reid Kleckner
rnk at google.com
Wed Jul 15 09:01:14 PDT 2015
On Mon, Jul 13, 2015 at 12:33 PM, Chih-hung Hsieh <chh at google.com> wrote:
>
> I found that long double complex (with two f128 values) also have calling
> convention compatibility problem with gcc and can be fixed similarly.
> My current patch does change quite a few places in type legalizing pass
> and some other optimizations related to f128 or i128 values. A few changes
> in the softening of floating point types to keep some f128 typed IR and
> convert some f128 opcode to library function calls.
>
> Has anyone tried this approach or have other solution?
>
It sounds like you're on the right track for the low-level part of this.
The responsibility of matching platform ABI calling conventions is sort of
split across clang and LLVM. I think the way to get the calling convention
right is to change Clang to use x86_fp80 as the LLVM type for parameter and
return types, with some extra coercions inserted before calls and in
function prologues.
The mangling will need a separate change as it doesn't look at LLVM IR.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150715/b23aed66/attachment.html>
More information about the llvm-dev
mailing list