mirror of
https://git.code.sf.net/p/mingw-w64/mingw-w64
synced 2025-04-18 17:44:18 +03:00
crt: Move ARM64 trunc implementation to C files.
In preparation for using naked functions. Signed-off-by: Jacek Caban <jacek@codeweavers.com>
This commit is contained in:
parent
d0c80252d6
commit
0b27cfc5ce
@ -705,8 +705,8 @@ src_msvcrtarm64=\
|
||||
math/arm64/nearbyint.S \
|
||||
math/arm64/nearbyintf.S \
|
||||
math/arm64/nearbyintl.S \
|
||||
math/arm64/trunc.S \
|
||||
math/arm64/truncf.S \
|
||||
math/arm64/trunc.c \
|
||||
math/arm64/truncf.c \
|
||||
misc/__p___argc.c \
|
||||
misc/__p___argv.c \
|
||||
misc/__p___wargv.c \
|
||||
|
@ -287,6 +287,14 @@ static inline unsigned int __mingw_statusfp(void)
|
||||
return flags;
|
||||
}
|
||||
|
||||
#define __ASM_NAKED_FUNC(name,code) \
|
||||
asm(".text\n\t" \
|
||||
".p2align 2\n\t" \
|
||||
".globl " __MINGW64_STRINGIFY(__MINGW_USYMBOL(name)) "\n\t" \
|
||||
".def " __MINGW64_STRINGIFY(__MINGW_USYMBOL(name)) "; .scl 2; .type 32; .endef\n\t" \
|
||||
__MINGW64_STRINGIFY(__MINGW_USYMBOL(name)) ":\n\t" \
|
||||
code "\n\t");
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -3,14 +3,10 @@
|
||||
* This file is part of the mingw-w64 runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
*/
|
||||
#include <_mingw_mac.h>
|
||||
|
||||
.file "trunc.S"
|
||||
.text
|
||||
.p2align 2
|
||||
.globl __MINGW_USYMBOL(trunc)
|
||||
.def __MINGW_USYMBOL(trunc); .scl 2; .type 32; .endef
|
||||
#include <math.h>
|
||||
#include <internal.h>
|
||||
|
||||
__MINGW_USYMBOL(trunc):
|
||||
frintz d0, d0
|
||||
ret
|
||||
__ASM_NAKED_FUNC(trunc,
|
||||
"frintz d0, d0\n\t"
|
||||
"ret")
|
@ -1,16 +0,0 @@
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the mingw-w64 runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
*/
|
||||
#include <_mingw_mac.h>
|
||||
|
||||
.file "truncf.S"
|
||||
.text
|
||||
.p2align 2
|
||||
.globl __MINGW_USYMBOL(truncf)
|
||||
.def __MINGW_USYMBOL(truncf); .scl 2; .type 32; .endef
|
||||
|
||||
__MINGW_USYMBOL(truncf):
|
||||
frintz s0, s0
|
||||
ret
|
12
mingw-w64-crt/math/arm64/truncf.c
Normal file
12
mingw-w64-crt/math/arm64/truncf.c
Normal file
@ -0,0 +1,12 @@
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the mingw-w64 runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
#include <internal.h>
|
||||
|
||||
__ASM_NAKED_FUNC(truncf,
|
||||
"frintz s0, s0\n\t"
|
||||
"ret")
|
Loading…
x
Reference in New Issue
Block a user