mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: Need "_fpx_sw_bytes", "FP_XSTATE_MAGIC2_SIZE" and "FP_XSTATE_MAGIC{1,2}" definition to compile CoreCLR
Date: Tue, 30 Aug 2016 17:42:51 -0400	[thread overview]
Message-ID: <20160830214251.GO15995@brightrain.aerifal.cx> (raw)
In-Reply-To: <SN1PR14MB0318F2CCACBC902D303FDA14A7070@SN1PR14MB0318.namprd14.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 530 bytes --]

On Thu, Aug 04, 2016 at 09:15:40PM +0000, Dangling Pointer wrote:
> Please provide the user-facing definitions of "struct _fpx_sw_bytes" and macros "FP_XSTATE_MAGIC2_SIZE", "FP_XSTATE_MAGIC1" and "FP_XSTATE_MAGIC2" to compile CoreCLR.
> 
> 
> Related issue: https://github.com/dotnet/coreclr/issues/917#issuecomment-236907708
> 
> Usage:  https://github.com/dotnet/coreclr/blob/9585fc2/src/pal/src/include/pal/context.h#L142-L178

Would a patch like the attached me sufficient? Does 32-bit x86 need
something like this too?

Rich

[-- Attachment #2: fpx.diff --]
[-- Type: text/plain, Size: 582 bytes --]

diff --git a/arch/x86_64/bits/signal.h b/arch/x86_64/bits/signal.h
index e3c3141..5393649 100644
--- a/arch/x86_64/bits/signal.h
+++ b/arch/x86_64/bits/signal.h
@@ -33,6 +33,14 @@
 #endif
 
 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+#define FP_XSTATE_MAGIC1 0x46505853U
+#define FP_XSTATE_MAGIC2 0x46505845U
+#define FP_XSTATE_MAGIC2_SIZE 4UL
+struct _fpx_sw_bytes {
+	unsigned magic1, extended_size;
+	unsigned long xstate_bv;
+	unsigned xstate_size, padding[7];
+};
 typedef long long greg_t, gregset_t[23];
 typedef struct _fpstate {
 	unsigned short cwd, swd, ftw, fop;

  reply	other threads:[~2016-08-30 21:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-04 21:15 Dangling Pointer
2016-08-30 21:42 ` Rich Felker [this message]
2016-10-01 10:28   ` Jan Vorlicek

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=20160830214251.GO15995@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=musl@lists.openwall.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).