Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 26 Jan 2020 14:32:01 +1100 (AEDT)
From: Damian McGuckin <damianm@....com.au>
To: musl@...ts.openwall.com
Subject: Re: Considering x86-64 fenv.s to C


/*
  * mips64 ARCHITECTURE
  */
#include	<fenv.h>

#ifndef __mips_soft_float

static inline unsigned int fe_get_csr_arch(void)
{
 	unsigned int fcsr;

 	__asm__ __volatile__ ("cfc1 %0, $31" : "=r" (fcsr));
 	return fcsr;
}

static inline void fe_set_csr_arch(unsigned int fcsr)
{
 	__asm__ __volatile__ ("ctc1 %0, $31" : : "r" (fcsr));
}

#define	fe_get_e(e)	(e->__cw = fe_get_csr_arch())
#define	fe_set_e(e)	(fe_set_csr_arch(e->__cw))

#define	FE_DFL_ENV_DATA	{ 0 }

#include	"../fenv-generic.c"

#else

#include	"../fenv-trivial.c"

#endif

Regards - Damian

Pacific Engineering Systems International, 277-279 Broadway, Glebe NSW 2037
Ph:+61-2-8571-0847 .. Fx:+61-2-9692-9623 | unsolicited email not wanted here
Views & opinions here are mine and not those of any past or present employer

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.