| author | |
| committer | |
| log | b78751051f4b386899fb82054fc008f9dad73432 |
| tree | 60adc0e4812d407893b7a1cdb5ab79de63158598 |
| parent | 3124f700c736383ca8c63e773b804ef78cc0bd19 |
| signature |
7 files changed, 1 insertions(+), 136 deletions(-)
lib/libc/mingw/math/x86/floorf.S deleted-51| ... | ... | @@ -1,51 +0,0 @@ |
| 1 | /** | |
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | * This file is part of the mingw-w64 runtime package. | |
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | |
| 5 | */ | |
| 6 | #include <_mingw_mac.h> | |
| 7 | ||
| 8 | 	.file	"floorf.S" | |
| 9 | 	.text | |
| 10 | 	.p2align 4,,15 | |
| 11 | 	.globl __MINGW_USYMBOL(floorf) | |
| 12 | 	.def	__MINGW_USYMBOL(floorf);	.scl	2;	.type	32;	.endef | |
| 13 | #ifdef __x86_64__ | |
| 14 | 	.seh_proc __MINGW_USYMBOL(floorf) | |
| 15 | #endif | |
| 16 | __MINGW_USYMBOL(floorf): | |
| 17 | #if defined(_AMD64_) || defined(__x86_64__) | |
| 18 | subq $40, %rsp | |
| 19 | .seh_stackalloc 40 | |
| 20 | .seh_endprologue | |
| 21 | unpcklps %xmm0, %xmm0 | |
| 22 | cvtps2pd %xmm0, %xmm0 | |
| 23 | call floor | |
| 24 | unpcklpd %xmm0, %xmm0 | |
| 25 | cvtpd2ps %xmm0, %xmm0 | |
| 26 | addq $40, %rsp | |
| 27 | ret | |
| 28 | .seh_endproc | |
| 29 | .def __MINGW_USYMBOL(floor); .scl 2; .type 32; .endef | |
| 30 | #elif defined(_X86_) || defined(__i386__) | |
| 31 | 	flds	4(%esp) | |
| 32 | 	subl	$8,%esp | |
| 33 | ||
| 34 | 	fstcw	4(%esp)			/* store fpu control word */ | |
| 35 | ||
| 36 | 	/* We use here %edx although only the low 1 bits are defined. | |
| 37 | 	 But none of the operations should care and they are faster | |
| 38 | 	 than the 16 bit operations. */ | |
| 39 | 	movl	$0x400,%edx		/* round towards -oo */ | |
| 40 | 	orl	4(%esp),%edx | |
| 41 | 	andl	$0xf7ff,%edx | |
| 42 | 	movl	%edx,(%esp) | |
| 43 | 	fldcw	(%esp)			/* load modified control word */ | |
| 44 | ||
| 45 | 	frndint				/* round */ | |
| 46 | ||
| 47 | 	fldcw	4(%esp)			/* restore original control word */ | |
| 48 | ||
| 49 | 	addl	$8,%esp | |
| 50 | 	ret | |
| 51 | #endif |
lib/libc/mingw/math/x86/floorl.S deleted-63| ... | ... | @@ -1,63 +0,0 @@ |
| 1 | /** | |
| 2 | * This file has no copyright assigned and is placed in the Public Domain. | |
| 3 | * This file is part of the mingw-w64 runtime package. | |
| 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. | |
| 5 | */ | |
| 6 | #include <_mingw_mac.h> | |
| 7 | ||
| 8 | 	.file	"floorl.S" | |
| 9 | 	.text | |
| 10 | #ifdef __x86_64__ | |
| 11 | 	.align 8 | |
| 12 | #else | |
| 13 | 	.align 4 | |
| 14 | #endif | |
| 15 | 	.globl __MINGW_USYMBOL(floorl) | |
| 16 | 	.def	__MINGW_USYMBOL(floorl);	.scl	2;	.type	32;	.endef | |
| 17 | __MINGW_USYMBOL(floorl): | |
| 18 | #if defined(_AMD64_) || defined(__x86_64__) | |
| 19 | 	fldt	(%rdx) | |
| 20 | 	subq	$24,%rsp | |
| 21 | ||
| 22 | 	fstcw	8(%rsp)			/* store fpu control word */ | |
| 23 | ||
| 24 | 	/* We use here %edx although only the low 1 bits are defined. | |
| 25 | 	 But none of the operations should care and they are faster | |
| 26 | 	 than the 16 bit operations. */ | |
| 27 | 	movl	$0x400,%edx		/* round towards -oo */ | |
| 28 | 	orl	8(%rsp),%edx | |
| 29 | 	andl	$0xf7ff,%edx | |
| 30 | 	movl	%edx,(%rsp) | |
| 31 | 	fldcw	(%rsp)			/* load modified control word */ | |
| 32 | ||
| 33 | 	frndint				/* round */ | |
| 34 | ||
| 35 | 	fldcw	8(%rsp)			/* restore original control word */ | |
| 36 | ||
| 37 | 	addq	$24,%rsp | |
| 38 | 	movq	%rcx,%rax | |
| 39 | 	movq	$0,8(%rcx) | |
| 40 | 	fstpt	(%rcx) | |
| 41 | 	ret | |
| 42 | #elif defined(_X86_) || defined(__i386__) | |
| 43 | 	fldt	4(%esp) | |
| 44 | 	subl	$8,%esp | |
| 45 | ||
| 46 | 	fstcw	4(%esp)			/* store fpu control word */ | |
| 47 | ||
| 48 | 	/* We use here %edx although only the low 1 bits are defined. | |
| 49 | 	 But none of the operations should care and they are faster | |
| 50 | 	 than the 16 bit operations. */ | |
| 51 | 	movl	$0x400,%edx		/* round towards -oo */ | |
| 52 | 	orl	4(%esp),%edx | |
| 53 | 	andl	$0xf7ff,%edx | |
| 54 | 	movl	%edx,(%esp) | |
| 55 | 	fldcw	(%esp)			/* load modified control word */ | |
| 56 | ||
| 57 | 	frndint				/* round */ | |
| 58 | ||
| 59 | 	fldcw	4(%esp)			/* restore original control word */ | |
| 60 | ||
| 61 | 	addl	$8,%esp | |
| 62 | 	ret | |
| 63 | #endif |
lib/libc/musl/src/math/i386/floor.s+1-16| ... | ... | @@ -1,20 +1,5 @@ |
| 1 | .global floorf | |
| 2 | .type floorf,@function | |
| 3 | floorf: | |
| 4 | 	flds 4(%esp) | |
| 5 | 	jmp 1f | |
| 6 | ||
| 7 | .global floorl | |
| 8 | .type floorl,@function | |
| 9 | floorl: | |
| 10 | 	fldt 4(%esp) | |
| 11 | 	jmp 1f | |
| 1 | /* zig patch: removed `floorl` and `floorf` in favor of using zig compiler_rt's implementations */ | |
| 12 | 2 | |
| 13 | .global floor | |
| 14 | .type floor,@function | |
| 15 | floor: | |
| 16 | 	fldl 4(%esp) | |
| 17 | 1:	mov $0x7,%al | |
| 18 | 3 | 1:	fstcw 4(%esp) |
| 19 | 4 | 	mov 5(%esp),%ah |
| 20 | 5 | 	mov %al,5(%esp) |
lib/libc/musl/src/math/i386/floorf.s deleted-1| ... | ... | @@ -1 +0,0 @@ |
| 1 | # see floor.s |
lib/libc/musl/src/math/i386/floorl.s deleted-1| ... | ... | @@ -1 +0,0 @@ |
| 1 | # see floor.s |
src/libs/mingw.zig-2| ... | ... | @@ -931,7 +931,6 @@ const mingw32_x86_src = [_][]const u8{ |
| 931 | 931 | "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "exp2l.S", |
| 932 | 932 | "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "expl.c", |
| 933 | 933 | "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "expm1l.c", |
| 934 | "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "floorl.S", | |
| 935 | 934 | "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "fmodl.c", |
| 936 | 935 | "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "fucom.c", |
| 937 | 936 | "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "ilogbl.S", |
| ... | ... | @@ -975,7 +974,6 @@ const mingw32_x86_32_src = [_][]const u8{ |
| 975 | 974 | "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "atan2f.c", |
| 976 | 975 | "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "atanf.c", |
| 977 | 976 | "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "ceilf.S", |
| 978 | "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "floorf.S", | |
| 979 | 977 | "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "fmodf.c", |
| 980 | 978 | }; |
| 981 | 979 |
src/libs/musl.zig-2| ... | ... | @@ -953,8 +953,6 @@ const src_files = [_][]const u8{ |
| 953 | 953 | "musl/src/math/i386/exp_ld.s", |
| 954 | 954 | "musl/src/math/i386/expl.s", |
| 955 | 955 | "musl/src/math/i386/expm1l.s", |
| 956 | "musl/src/math/i386/floorf.s", | |
| 957 | "musl/src/math/i386/floorl.s", | |
| 958 | 956 | "musl/src/math/i386/floor.s", |
| 959 | 957 | "musl/src/math/i386/fmod.c", |
| 960 | 958 | "musl/src/math/i386/fmodf.c", |