From: Anthony Green <green@moxielogic.com>
To: Aaron Webster <awebster@falsecolour.com>
Cc: libffi-discuss@sourceware.org
Subject: Re: libffi intel icc and src/x86/ffi64.c
Date: Fri, 06 Apr 2012 12:48:00 -0000 [thread overview]
Message-ID: <CACxje59du-WkA5jHYM9p74BRRFzJ=Vw6Mk5gDctcr5wVrvOEAg@mail.gmail.com> (raw)
In-Reply-To: <20120403133135.GA21331@cshpc.rrze.uni-erlangen.de>
[-- Attachment #1: Type: text/plain, Size: 553 bytes --]
On Tue, Apr 3, 2012 at 9:31 AM, Aaron Webster <awebster@falsecolour.com> wrote:
> I've seen some things on the internet about people trying to build libffi
> with intel icc, which doesn't define __int128_t.
>
> I've found that you can just use
>
> long long sse[MAX_SSE_REGS];
>
> instead of __int128_t in src/x86/ffi64.c, and everything will compile fine.
> I think the real intel type is something like __m128, but I'm not 100%
> sure.
Hi Aaron,
Could you please try this patch out with the intel compiler?
Thanks,
AG
>
> --
> Aaron Webster
>
[-- Attachment #2: icc128 --]
[-- Type: application/octet-stream, Size: 1025 bytes --]
Index: libffi/ChangeLog
===================================================================
--- libffi.orig/ChangeLog
+++ libffi/ChangeLog
@@ -1,5 +1,10 @@
2012-04-06 Anthony Green <green@moxielogic.com>
+ * src/x86/ffi64.c (UINT128): Define differently for Intel and GNU
+ compilers, then use it.
+
+2012-04-06 Anthony Green <green@moxielogic.com>
+
* testsuite/Makefile.am (EXTRA_DIST): Add missing test cases.
* testsuite/Makefile.in: Rebuilt.
Index: libffi/src/x86/ffi64.c
===================================================================
--- libffi.orig/src/x86/ffi64.c
+++ libffi/src/x86/ffi64.c
@@ -37,11 +37,17 @@
#define MAX_GPR_REGS 6
#define MAX_SSE_REGS 8
+#ifdef __INTEL_COMPILER
+#define UINT128 __m128
+#else
+#define UINT128 __int128_t
+#endif
+
struct register_args
{
/* Registers for argument passing. */
UINT64 gpr[MAX_GPR_REGS];
- __int128_t sse[MAX_SSE_REGS];
+ UINT128 sse[MAX_SSE_REGS];
};
extern void ffi_call_unix64 (void *args, unsigned long bytes, unsigned flags,
prev parent reply other threads:[~2012-04-06 12:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-03 13:31 Aaron Webster
2012-04-06 12:48 ` Anthony Green [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CACxje59du-WkA5jHYM9p74BRRFzJ=Vw6Mk5gDctcr5wVrvOEAg@mail.gmail.com' \
--to=green@moxielogic.com \
--cc=awebster@falsecolour.com \
--cc=libffi-discuss@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).