mirror of
https://git.planet-casio.com/Lephenixnoir/OpenLibm.git
synced 2024-12-28 04:23:41 +01:00
fix amd64 asm syntax for windows
This commit is contained in:
parent
1b9b759b48
commit
3c8738e642
3 changed files with 18 additions and 11 deletions
|
@ -62,8 +62,17 @@
|
|||
|
||||
#define _START_ENTRY .text; .p2align 4,0x90
|
||||
|
||||
#if defined(__linux__) || defined(__FreeBSD__) || defined(__ELF__)
|
||||
#define _ENTRY(x) _START_ENTRY; \
|
||||
.globl CNAME(x); .type CNAME(x),@function; CNAME(x):
|
||||
#define END(x) .size x, . - x
|
||||
|
||||
#elif defined(__WIN32__)
|
||||
#define _ENTRY(x) _START_ENTRY; \
|
||||
.globl CNAME(x); .def CNAME(x); .scl 2; .type 32; .endef; CNAME(x):
|
||||
#define END(x) .end
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef PROF
|
||||
#define ALTENTRY(x) _ENTRY(x); \
|
||||
|
@ -81,7 +90,6 @@
|
|||
#define ENTRY(x) _ENTRY(x)
|
||||
#endif
|
||||
|
||||
#define END(x) .size x, . - x
|
||||
|
||||
#define RCSID(x) .text; .asciz x
|
||||
|
||||
|
|
14
amd64/fenv.c
14
amd64/fenv.c
|
@ -97,7 +97,7 @@ fegetenv(fenv_t *envp)
|
|||
int
|
||||
feholdexcept(fenv_t *envp)
|
||||
{
|
||||
__uint32_t mxcsr;
|
||||
uint32_t mxcsr;
|
||||
|
||||
__stmxcsr(&mxcsr);
|
||||
__fnstenv(&envp->__x87);
|
||||
|
@ -114,8 +114,8 @@ extern inline int fesetenv(const fenv_t *__envp);
|
|||
int
|
||||
feupdateenv(const fenv_t *envp)
|
||||
{
|
||||
__uint32_t mxcsr;
|
||||
__uint16_t status;
|
||||
uint32_t mxcsr;
|
||||
uint16_t status;
|
||||
|
||||
__fnstsw(&status);
|
||||
__stmxcsr(&mxcsr);
|
||||
|
@ -127,8 +127,8 @@ feupdateenv(const fenv_t *envp)
|
|||
int
|
||||
__feenableexcept(int mask)
|
||||
{
|
||||
__uint32_t mxcsr, omask;
|
||||
__uint16_t control;
|
||||
uint32_t mxcsr, omask;
|
||||
uint16_t control;
|
||||
|
||||
mask &= FE_ALL_EXCEPT;
|
||||
__fnstcw(&control);
|
||||
|
@ -144,8 +144,8 @@ __feenableexcept(int mask)
|
|||
int
|
||||
__fedisableexcept(int mask)
|
||||
{
|
||||
__uint32_t mxcsr, omask;
|
||||
__uint16_t control;
|
||||
uint32_t mxcsr, omask;
|
||||
uint16_t control;
|
||||
|
||||
mask &= FE_ALL_EXCEPT;
|
||||
__fnstcw(&control);
|
||||
|
|
|
@ -81,9 +81,8 @@
|
|||
#elif defined(__WIN32__)
|
||||
#define CNAME(csym) _##csym
|
||||
#define HIDENAME(asmsym) .asmsym
|
||||
#define _ENTRY(x) \
|
||||
_START_ENTRY; .globl CNAME(x) ; .def CNAME(X);\
|
||||
.scl 2;.type 32;.endef; CNAME(x):
|
||||
#define _ENTRY(x) _START_ENTRY; \
|
||||
.globl CNAME(x); .def CNAME(x); .scl 2; .type 32; .endef; CNAME(x):
|
||||
#define END(x) .end
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue