* libffi intel icc and src/x86/ffi64.c
@ 2012-04-03 13:31 Aaron Webster
2012-04-06 12:48 ` Anthony Green
0 siblings, 1 reply; 2+ messages in thread
From: Aaron Webster @ 2012-04-03 13:31 UTC (permalink / raw)
To: libffi-discuss
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.
--
Aaron Webster
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: libffi intel icc and src/x86/ffi64.c
2012-04-03 13:31 libffi intel icc and src/x86/ffi64.c Aaron Webster
@ 2012-04-06 12:48 ` Anthony Green
0 siblings, 0 replies; 2+ messages in thread
From: Anthony Green @ 2012-04-06 12:48 UTC (permalink / raw)
To: Aaron Webster; +Cc: libffi-discuss
[-- 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,
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-04-06 12:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-03 13:31 libffi intel icc and src/x86/ffi64.c Aaron Webster
2012-04-06 12:48 ` Anthony Green
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).