Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8da913a6a544499cbe2b15d4055e4668@tachyum.com>
Date: Thu, 29 Jan 2026 21:57:44 +0000
From: Michael Morrell <mmorrell@...hyum.com>
To: "musl@...ts.openwall.com" <musl@...ts.openwall.com>
CC: "dalias@...c.org" <dalias@...c.org>, "dalias@...ifal.cx"
	<dalias@...ifal.cx>, Bill Roberts <bill.roberts@....com>
Subject: RE: [PATCH v3] aarch64: rewrite fenv routines in C using
 inline asm

+static inline uint32_t read_fpcr_u32(void) {
+	uint64_t x;
+	__asm__ volatile ("mrs %0, fpcr" : "=r"(x));
+	return (uint32_t)x;
+}
+
+static inline void write_fpcr_u32(uint32_t v) {
+	uint64_t x = v;
+	__asm__ volatile ("msr fpcr, %0" :: "r"(x) : "memory"); }
+
+static inline uint32_t read_fpsr_u32(void) {
+	uint64_t x;
+	__asm__ volatile ("mrs %0, fpsr" : "=r"(x));
+	return (uint32_t)x;
+}
+
+static inline void write_fpsr_u32(uint32_t v) {
+	uint64_t x = v;
+	__asm__ volatile ("msr fpsr, %0" :: "r"(x) : "memory"); }
+

Shouldn't the ending brace be on its own line for write_fpcr_u32 and write_fpsr_u32?

   Michael

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.