This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
RFC: Should x86-64 support arbitrary calling conventions?
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 16 Mar 2017 15:07:08 -0700
- Subject: RFC: Should x86-64 support arbitrary calling conventions?
- Authentication-results: sourceware.org; auth=none
According to x86-64 psABI, xmm0-xmm7 can be used to pass function
parameters. But ICC also uses xmm8-xmm15 to pass function parameters.
This doesn't work with newer glibc since _dl_runtime_resolve only preserves
the first 8 vector registers:
https://sourceware.org/bugzilla/show_bug.cgi?id=21236
We can use xsave/xrstor to preserve all vector registers to support arbitrary
calling conventions. But xsave/restor is about 8X slower, comparing against
saving/restoring the first 8 vector registers.
--
H.J.