https://git.reactos.org/?p=reactos.git;a=commitdiff;h=54406bf4f070f9cf6d162…
commit 54406bf4f070f9cf6d1621ba87521bd77b73b0ce
Author: Stanislav Motylkov <x86corez(a)gmail.com>
AuthorDate: Fri Jul 30 22:48:03 2021 +0300
Commit: Stanislav Motylkov <x86corez(a)gmail.com>
CommitDate: Fri Jul 30 22:48:03 2021 +0300
[CRT/ARM] __fto64: Assembly wrappers are actually not needed anymore
Addendum to e448094e. CORE-17703 CORE-17604
---
sdk/lib/crt/math/arm/__dtoi64.c | 13 ++++++++
sdk/lib/crt/math/arm/__dtoi64.s | 38 ----------------------
sdk/lib/crt/math/arm/__dtoi64_worker.c | 14 --------
sdk/lib/crt/math/arm/__dtou64.c | 12 +++++++
sdk/lib/crt/math/arm/__dtou64.s | 38 ----------------------
sdk/lib/crt/math/arm/__dtou64_worker.c | 13 --------
.../crt/math/arm/{__fto64_worker.h => __fto64.h} | 4 +--
sdk/lib/crt/math/arm/__stoi64.c | 12 +++++++
sdk/lib/crt/math/arm/__stoi64.s | 37 ---------------------
sdk/lib/crt/math/arm/__stoi64_worker.c | 13 --------
sdk/lib/crt/math/arm/__stou64.c | 11 +++++++
sdk/lib/crt/math/arm/__stou64.s | 37 ---------------------
sdk/lib/crt/math/arm/__stou64_worker.c | 12 -------
sdk/lib/crt/math/math.cmake | 12 +++----
sdk/lib/crt/msvcrtex.cmake | 12 +++----
15 files changed, 58 insertions(+), 220 deletions(-)
diff --git a/sdk/lib/crt/math/arm/__dtoi64.c b/sdk/lib/crt/math/arm/__dtoi64.c
new file mode 100644
index 00000000000..d6471c83254
--- /dev/null
+++ b/sdk/lib/crt/math/arm/__dtoi64.c
@@ -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(a)reactos.org>
+ * Copyright 2021 Roman Masanin <36927roma(a)gmail.com>
+ */
+
+#define __fto64 __dtoi64
+#define _USE_64_BITS_
+#define _USE_SIGNED_
+
+#include "__fto64.h"
diff --git a/sdk/lib/crt/math/arm/__dtoi64.s b/sdk/lib/crt/math/arm/__dtoi64.s
deleted file mode 100644
index 9e7e4cb7d74..00000000000
--- a/sdk/lib/crt/math/arm/__dtoi64.s
+++ /dev/null
@@ -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(a)reactos.org>
- * Copyright 2021 Roman Masanin <36927roma(a)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 */
diff --git a/sdk/lib/crt/math/arm/__dtoi64_worker.c
b/sdk/lib/crt/math/arm/__dtoi64_worker.c
deleted file mode 100644
index beb247b24f5..00000000000
--- a/sdk/lib/crt/math/arm/__dtoi64_worker.c
+++ /dev/null
@@ -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(a)gmail.com>
- */
-
-#define __fto64_worker __dtoi64_worker
-#define _USE_64_BITS_
-#define _USE_SIGNED_
-
-#include "__fto64_worker.h"
-
-/* __dtoi64 is implemented in __dtoi64.s */
diff --git a/sdk/lib/crt/math/arm/__dtou64.c b/sdk/lib/crt/math/arm/__dtou64.c
new file mode 100644
index 00000000000..81dc083a0f9
--- /dev/null
+++ b/sdk/lib/crt/math/arm/__dtou64.c
@@ -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(a)reactos.org>
+ * Copyright 2021 Roman Masanin <36927roma(a)gmail.com>
+ */
+
+#define __fto64 __dtou64
+#define _USE_64_BITS_
+
+#include "__fto64.h"
diff --git a/sdk/lib/crt/math/arm/__dtou64.s b/sdk/lib/crt/math/arm/__dtou64.s
deleted file mode 100644
index d204525a130..00000000000
--- a/sdk/lib/crt/math/arm/__dtou64.s
+++ /dev/null
@@ -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(a)reactos.org>
- * Copyright 2021 Roman Masanin <36927roma(a)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 */
diff --git a/sdk/lib/crt/math/arm/__dtou64_worker.c
b/sdk/lib/crt/math/arm/__dtou64_worker.c
deleted file mode 100644
index 432bd5df7f0..00000000000
--- a/sdk/lib/crt/math/arm/__dtou64_worker.c
+++ /dev/null
@@ -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(a)gmail.com>
- */
-
-#define __fto64_worker __dtou64_worker
-#define _USE_64_BITS_
-
-#include "__fto64_worker.h"
-
-/* __dtou64 is implemented in __dtou64.s */
diff --git a/sdk/lib/crt/math/arm/__fto64_worker.h b/sdk/lib/crt/math/arm/__fto64.h
similarity index 95%
rename from sdk/lib/crt/math/arm/__fto64_worker.h
rename to sdk/lib/crt/math/arm/__fto64.h
index e5e77b1665b..c933c711565 100644
--- a/sdk/lib/crt/math/arm/__fto64_worker.h
+++ b/sdk/lib/crt/math/arm/__fto64.h
@@ -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(a)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;
diff --git a/sdk/lib/crt/math/arm/__stoi64.c b/sdk/lib/crt/math/arm/__stoi64.c
new file mode 100644
index 00000000000..455d0cf383c
--- /dev/null
+++ b/sdk/lib/crt/math/arm/__stoi64.c
@@ -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(a)reactos.org>
+ * Copyright 2021 Roman Masanin <36927roma(a)gmail.com>
+ */
+
+#define __fto64 __stoi64
+#define _USE_SIGNED_
+
+#include "__fto64.h"
diff --git a/sdk/lib/crt/math/arm/__stoi64.s b/sdk/lib/crt/math/arm/__stoi64.s
deleted file mode 100644
index 636d35c9d9b..00000000000
--- a/sdk/lib/crt/math/arm/__stoi64.s
+++ /dev/null
@@ -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(a)reactos.org>
- * Copyright 2021 Roman Masanin <36927roma(a)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 */
diff --git a/sdk/lib/crt/math/arm/__stoi64_worker.c
b/sdk/lib/crt/math/arm/__stoi64_worker.c
deleted file mode 100644
index d7beeb8d26b..00000000000
--- a/sdk/lib/crt/math/arm/__stoi64_worker.c
+++ /dev/null
@@ -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(a)gmail.com>
- */
-
-#define __fto64_worker __stoi64_worker
-#define _USE_SIGNED_
-
-#include "__fto64_worker.h"
-
-/* __stoi64 is implemented in __stoi64.s */
diff --git a/sdk/lib/crt/math/arm/__stou64.c b/sdk/lib/crt/math/arm/__stou64.c
new file mode 100644
index 00000000000..65c9102a27f
--- /dev/null
+++ b/sdk/lib/crt/math/arm/__stou64.c
@@ -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(a)reactos.org>
+ * Copyright 2021 Roman Masanin <36927roma(a)gmail.com>
+ */
+
+#define __fto64 __stou64
+
+#include "__fto64.h"
diff --git a/sdk/lib/crt/math/arm/__stou64.s b/sdk/lib/crt/math/arm/__stou64.s
deleted file mode 100644
index eac8c64c9fc..00000000000
--- a/sdk/lib/crt/math/arm/__stou64.s
+++ /dev/null
@@ -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(a)reactos.org>
- * Copyright 2021 Roman Masanin <36927roma(a)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 */
diff --git a/sdk/lib/crt/math/arm/__stou64_worker.c
b/sdk/lib/crt/math/arm/__stou64_worker.c
deleted file mode 100644
index b373da1ad84..00000000000
--- a/sdk/lib/crt/math/arm/__stou64_worker.c
+++ /dev/null
@@ -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(a)gmail.com>
- */
-
-#define __fto64_worker __stou64_worker
-
-#include "__fto64_worker.h"
-
-/* __stou64 is implemented in __stou64.s */
diff --git a/sdk/lib/crt/math/math.cmake b/sdk/lib/crt/math/math.cmake
index 16cfdd10fd2..8e2cd175e9a 100644
--- a/sdk/lib/crt/math/math.cmake
+++ b/sdk/lib/crt/math/math.cmake
@@ -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
diff --git a/sdk/lib/crt/msvcrtex.cmake b/sdk/lib/crt/msvcrtex.cmake
index 8034116c8c1..7c6544e85ff 100644
--- a/sdk/lib/crt/msvcrtex.cmake
+++ b/sdk/lib/crt/msvcrtex.cmake
@@ -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