[CRT/ARM] __fto64: Assembly wrappers are actually not needed anymore

Addendum to e448094e. CORE-17703 CORE-17604
This commit is contained in:
Stanislav Motylkov 2021-07-30 22:48:03 +03:00
parent b0dfe20981
commit 54406bf4f0
No known key found for this signature in database
GPG key ID: AFE513258CBA9E92
15 changed files with 58 additions and 220 deletions

View file

@ -0,0 +1,13 @@
/*
* PROJECT: ReactOS CRT library
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: Implementation of __dtoi64
* COPYRIGHT: Copyright 2015 Timo Kreuzer <timo.kreuzer@reactos.org>
* Copyright 2021 Roman Masanin <36927roma@gmail.com>
*/
#define __fto64 __dtoi64
#define _USE_64_BITS_
#define _USE_SIGNED_
#include "__fto64.h"

View file

@ -1,38 +0,0 @@
/*
* PROJECT: ReactOS CRT library
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: Implementation of __dtoi64
* COPYRIGHT: Copyright 2015 Timo Kreuzer <timo.kreuzer@reactos.org>
* Copyright 2021 Roman Masanin <36927roma@gmail.com>
*/
/* INCLUDES ******************************************************************/
#include <kxarm.h>
IMPORT __dtoi64_worker
/* CODE **********************************************************************/
TEXTAREA
/*
IN: d0 = double value
OUT: r1:r0 = int64 value
*/
LEAF_ENTRY __dtoi64
/* Allocate stack space and store parameters there */
push {lr}
PROLOG_END
/* Call the C worker function */
VMOV r0,d0[0]
VMOV r1,d0[1]
bl __dtoi64_worker
/* Move result data into the appropriate registers and return */
pop {pc}
LEAF_END __dtoi64
END
/* EOF */

View file

@ -1,14 +0,0 @@
/*
* PROJECT: ReactOS CRT library
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: Implementation of __dtoi64_worker
* COPYRIGHT: Copyright 2021 Roman Masanin <36927roma@gmail.com>
*/
#define __fto64_worker __dtoi64_worker
#define _USE_64_BITS_
#define _USE_SIGNED_
#include "__fto64_worker.h"
/* __dtoi64 is implemented in __dtoi64.s */

View file

@ -0,0 +1,12 @@
/*
* PROJECT: ReactOS CRT library
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: Implementation of __dtou64
* COPYRIGHT: Copyright 2015 Timo Kreuzer <timo.kreuzer@reactos.org>
* Copyright 2021 Roman Masanin <36927roma@gmail.com>
*/
#define __fto64 __dtou64
#define _USE_64_BITS_
#include "__fto64.h"

View file

@ -1,38 +0,0 @@
/*
* PROJECT: ReactOS CRT library
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: Implementation of __dtou64
* COPYRIGHT: Copyright 2015 Timo Kreuzer <timo.kreuzer@reactos.org>
* Copyright 2021 Roman Masanin <36927roma@gmail.com>
*/
/* INCLUDES ******************************************************************/
#include <kxarm.h>
IMPORT __dtou64_worker
/* CODE **********************************************************************/
TEXTAREA
/*
IN: d0 = double value
OUT: r1:r0 = uint64 value
*/
LEAF_ENTRY __dtou64
/* Allocate stack space and store parameters there */
push {lr}
PROLOG_END
/* Call the C worker function */
VMOV r0,d0[0]
VMOV r1,d0[1]
bl __dtou64_worker
/* Move result data into the appropriate registers and return */
pop {pc}
LEAF_END __dtou64
END
/* EOF */

View file

@ -1,13 +0,0 @@
/*
* PROJECT: ReactOS CRT library
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: Implementation of __dtou64_worker
* COPYRIGHT: Copyright 2021 Roman Masanin <36927roma@gmail.com>
*/
#define __fto64_worker __dtou64_worker
#define _USE_64_BITS_
#include "__fto64_worker.h"
/* __dtou64 is implemented in __dtou64.s */

View file

@ -1,7 +1,7 @@
/*
* PROJECT: ReactOS CRT library
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: Implementation of __dtoi64
* PURPOSE: Float to integer conversion (__dtoi64/dtou64/stoi64/stou64)
* COPYRIGHT: Copyright 2021 Roman Masanin <36927roma@gmail.com>
*/
@ -44,7 +44,7 @@ long long FTO64_RESULT;
#define NEGATE(x) (~(x) + 1)
FTO64_RESULT
__fto64_worker(FLOAT_TYPE value)
__fto64(FLOAT_TYPE value)
{
union {
FLOAT_TYPE val_float;

View file

@ -0,0 +1,12 @@
/*
* PROJECT: ReactOS CRT library
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: Implementation of __stoi64
* COPYRIGHT: Copyright 2015 Timo Kreuzer <timo.kreuzer@reactos.org>
* Copyright 2021 Roman Masanin <36927roma@gmail.com>
*/
#define __fto64 __stoi64
#define _USE_SIGNED_
#include "__fto64.h"

View file

@ -1,37 +0,0 @@
/*
* PROJECT: ReactOS CRT library
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: Implementation of __stoi64
* COPYRIGHT: Copyright 2015 Timo Kreuzer <timo.kreuzer@reactos.org>
* Copyright 2021 Roman Masanin <36927roma@gmail.com>
*/
/* INCLUDES ******************************************************************/
#include <kxarm.h>
IMPORT __stoi64_worker
/* CODE **********************************************************************/
TEXTAREA
/*
IN: s0 = single (float) value
OUT: r1:r0 = int64 value
*/
LEAF_ENTRY __stoi64
/* Allocate stack space and store parameters there */
push {lr}
PROLOG_END
/* Call the C worker function */
VMOV r0,s0
bl __stoi64_worker
/* Move result data into the appropriate registers and return */
pop {pc}
LEAF_END __stoi64
END
/* EOF */

View file

@ -1,13 +0,0 @@
/*
* PROJECT: ReactOS CRT library
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: Implementation of __stoi64_worker
* COPYRIGHT: Copyright 2021 Roman Masanin <36927roma@gmail.com>
*/
#define __fto64_worker __stoi64_worker
#define _USE_SIGNED_
#include "__fto64_worker.h"
/* __stoi64 is implemented in __stoi64.s */

View file

@ -0,0 +1,11 @@
/*
* PROJECT: ReactOS CRT library
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: Implementation of __stou64
* COPYRIGHT: Copyright 2015 Timo Kreuzer <timo.kreuzer@reactos.org>
* Copyright 2021 Roman Masanin <36927roma@gmail.com>
*/
#define __fto64 __stou64
#include "__fto64.h"

View file

@ -1,37 +0,0 @@
/*
* PROJECT: ReactOS CRT library
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: Implementation of __stou64
* COPYRIGHT: Copyright 2015 Timo Kreuzer <timo.kreuzer@reactos.org>
* Copyright 2021 Roman Masanin <36927roma@gmail.com>
*/
/* INCLUDES ******************************************************************/
#include <kxarm.h>
IMPORT __stou64_worker
/* CODE **********************************************************************/
TEXTAREA
/*
IN: s0 = single (float) value
OUT: r1:r0 = uint64 value
*/
LEAF_ENTRY __stou64
/* Allocate stack space and store parameters there */
push {lr}
PROLOG_END
/* Call the C worker function */
VMOV r0,s0
bl __stou64_worker
/* Move result data into the appropriate registers and return */
pop {pc}
LEAF_END __stou64
END
/* EOF */

View file

@ -1,12 +0,0 @@
/*
* PROJECT: ReactOS CRT library
* LICENSE: MIT (https://spdx.org/licenses/MIT)
* PURPOSE: Implementation of __stou64_worker
* COPYRIGHT: Copyright 2021 Roman Masanin <36927roma@gmail.com>
*/
#define __fto64_worker __stou64_worker
#include "__fto64_worker.h"
/* __stou64 is implemented in __stou64.s */

View file

@ -79,10 +79,10 @@ elseif(ARCH STREQUAL "arm")
math/arm/__rt_sdiv64_worker.c
math/arm/__rt_udiv.c
math/arm/__rt_udiv64_worker.c
math/arm/__dtoi64_worker.c
math/arm/__dtou64_worker.c
math/arm/__stoi64_worker.c
math/arm/__stou64_worker.c
math/arm/__dtoi64.c
math/arm/__dtou64.c
math/arm/__stoi64.c
math/arm/__stou64.c
)
list(APPEND CRT_MATH_SOURCE
math/fabsf.c
@ -100,12 +100,8 @@ elseif(ARCH STREQUAL "arm")
math/arm/log10.s
math/arm/pow.s
math/arm/tan.s
math/arm/__dtoi64.s
math/arm/__dtou64.s
math/arm/__i64tod.s
math/arm/__i64tos.s
math/arm/__stoi64.s
math/arm/__stou64.s
math/arm/__u64tod.s
math/arm/__u64tos.s
math/arm/__rt_sdiv64.s

View file

@ -72,19 +72,15 @@ elseif(ARCH STREQUAL "arm")
math/arm/__rt_sdiv64_worker.c
math/arm/__rt_udiv.c
math/arm/__rt_udiv64_worker.c
math/arm/__dtoi64_worker.c
math/arm/__dtou64_worker.c
math/arm/__stoi64_worker.c
math/arm/__stou64_worker.c
math/arm/__dtoi64.c
math/arm/__dtou64.c
math/arm/__stoi64.c
math/arm/__stou64.c
)
list(APPEND MSVCRTEX_ASM_SOURCE
except/arm/chkstk_asm.s
math/arm/__dtoi64.s
math/arm/__dtou64.s
math/arm/__i64tod.s
math/arm/__i64tos.s
math/arm/__stoi64.s
math/arm/__stou64.s
math/arm/__u64tod.s
math/arm/__u64tos.s
math/arm/__rt_sdiv64.s