ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
September 2021
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
25 participants
144 discussions
Start a n
N
ew thread
[reactos] 02/04: [WIN32SS:NTUSER] Update the definition of SHAREDINFO and fix the definition of FNID_LAST. (#3937)
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a407cb8f109b6b47ff540…
commit a407cb8f109b6b47ff5403108ca5c1d5738225af Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Thu Sep 2 01:05:46 2021 +0200 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Thu Sep 9 16:15:11 2021 +0200 [WIN32SS:NTUSER] Update the definition of SHAREDINFO and fix the definition of FNID_LAST. (#3937) --- win32ss/include/ntuser.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/win32ss/include/ntuser.h b/win32ss/include/ntuser.h index b94e9c8d3e3..2bef1a3d2e8 100644 --- a/win32ss/include/ntuser.h +++ b/win32ss/include/ntuser.h @@ -858,10 +858,11 @@ typedef LONG_PTR #define FNID_TOOLTIPS 0x02B6 #define FNID_SENDNOTIFYMESSAGE 0x02B7 #define FNID_SENDMESSAGECALLBACK 0x02B8 -#define FNID_LAST 0x02B9 -#define FNID_NUM FNID_LAST - FNID_FIRST + 1 -#define FNID_NUMSERVERPROC FNID_SWITCH - FNID_FIRST + 1 +#define FNID_LAST FNID_SENDMESSAGECALLBACK + +#define FNID_NUM (FNID_LAST - FNID_FIRST + 1) +#define FNID_NUMSERVERPROC (FNID_SWITCH - FNID_FIRST + 1) #define FNID_DDEML 0x2000 /* Registers DDEML */ #define FNID_DESTROY 0x4000 /* This is sent when WM_NCDESTROY or in the support routine. */ @@ -1084,11 +1085,11 @@ typedef struct _WNDMSG typedef struct _SHAREDINFO { - PSERVERINFO psi; /* global Server Info */ - PVOID aheList; /* Handle Entry List */ - PVOID pDispInfo; /* global PDISPLAYINFO pointer */ - ULONG_PTR ulSharedDelta; /* Heap delta */ - WNDMSG awmControl[FNID_LAST - FNID_FIRST]; + PSERVERINFO psi; /* Global Server Info */ + PVOID aheList; /* Handle Entry List */ + PVOID pDispInfo; /* Global PDISPLAYINFO pointer */ + ULONG_PTR ulSharedDelta; /* Shared USER mapped section delta */ + WNDMSG awmControl[FNID_NUM]; WNDMSG DefWindowMsgs; WNDMSG DefWindowSpecMsgs; } SHAREDINFO, *PSHAREDINFO;
3 years, 3 months
1
0
0
0
[reactos] 01/04: [WIN32KNT_APITEST] Add more tests for NtUserProcessConnect() (#3937)
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=103c43861b239604341a7…
commit 103c43861b239604341a7c213a0e39ea89b1ab50 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Sat Sep 4 19:53:09 2021 +0200 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Thu Sep 9 16:15:05 2021 +0200 [WIN32KNT_APITEST] Add more tests for NtUserProcessConnect() (#3937) Show that NtUserProcessConnect() should return pointers in user client-space. --- .../apitests/win32nt/ntuser/NtUserProcessConnect.c | 40 ++++++++++++++++++---- 1 file changed, 34 insertions(+), 6 deletions(-) diff --git a/modules/rostests/apitests/win32nt/ntuser/NtUserProcessConnect.c b/modules/rostests/apitests/win32nt/ntuser/NtUserProcessConnect.c index e89a65b7073..9ff9e7d82f4 100644 --- a/modules/rostests/apitests/win32nt/ntuser/NtUserProcessConnect.c +++ b/modules/rostests/apitests/win32nt/ntuser/NtUserProcessConnect.c @@ -1,22 +1,29 @@ /* - * PROJECT: ReactOS api tests - * LICENSE: GPL - See COPYING in the top level directory - * PURPOSE: Test for NtUserProcessConnect - * PROGRAMMERS: + * PROJECT: ReactOS api tests + * LICENSE: LGPL-2.0-or-later (
https://spdx.org/licenses/LGPL-2.0-or-later
) + * PURPOSE: Test for NtUserProcessConnect + * COPYRIGHT: Copyright 2008-2020 Timo Kreuzer + * Copyright 2021 Hermes Belusca-Maito */ #include <win32nt.h> +#define NTOS_MODE_USER +#include <ndk/exfuncs.h> + START_TEST(NtUserProcessConnect) { HANDLE hProcess; NTSTATUS Status; USERCONNECT UserConnect = {0}; + SYSTEM_BASIC_INFORMATION SystemInformation; + ULONG_PTR MaximumUserModeAddress; hProcess = GetCurrentProcess(); - UserConnect.ulVersion = MAKELONG(0, 5); - Status = NtUserProcessConnect(hProcess, &UserConnect, sizeof(USERCONNECT)); + UserConnect.ulVersion = MAKELONG(0, 5); // == USER_VERSION + // UserConnect.dwDispatchCount; + Status = NtUserProcessConnect(hProcess, &UserConnect, sizeof(UserConnect)); TEST(NT_SUCCESS(Status)); printf("UserConnect.ulVersion = 0x%lx\n", UserConnect.ulVersion); @@ -27,4 +34,25 @@ START_TEST(NtUserProcessConnect) printf("UserConnect.siClient.pDispInfo = 0x%p\n", UserConnect.siClient.pDispInfo); printf("UserConnect.siClient.ulSharedDelta = 0x%Ix\n", UserConnect.siClient.ulSharedDelta); + /* Verify the validity of some mandatory fields */ + TEST(UserConnect.ulVersion == MAKELONG(0, 5)); + TEST(UserConnect.ulCurrentVersion == 0); + TEST(UserConnect.siClient.ulSharedDelta != 0); + + /* Get the max um address */ + Status = NtQuerySystemInformation(SystemBasicInformation, + &SystemInformation, + sizeof(SystemInformation), + NULL); + TEST(NT_SUCCESS(Status)); + + MaximumUserModeAddress = SystemInformation.MaximumUserModeAddress; + + /* Verify the validity of pointers -- They must be in client space */ + TEST(UserConnect.siClient.psi != NULL); + TEST(UserConnect.siClient.aheList != NULL); + // TEST(UserConnect.siClient.pDispInfo != NULL); + TEST((ULONG_PTR)UserConnect.siClient.psi < MaximumUserModeAddress); + TEST((ULONG_PTR)UserConnect.siClient.aheList < MaximumUserModeAddress); + // TEST((ULONG_PTR)UserConnect.siClient.pDispInfo < MaximumUserModeAddress); }
3 years, 3 months
1
0
0
0
[reactos] 02/02: [CRT_APITEST] Add tests for __i64tod/u64tod/i64tos/u64tos on ARM (#3866)
by Stanislav Motylkov
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a2e9dcf0a709982af739e…
commit a2e9dcf0a709982af739e895b27623f70f77d56b Author: Stanislav Motylkov <x86corez(a)gmail.com> AuthorDate: Thu Sep 9 01:14:44 2021 +0300 Commit: Stanislav Motylkov <x86corez(a)gmail.com> CommitDate: Thu Sep 9 16:02:11 2021 +0300 [CRT_APITEST] Add tests for __i64tod/u64tod/i64tos/u64tos on ARM (#3866) CORE-17713 CORE-17706 CORE-17604 --- modules/rostests/apitests/crt/__64tof.c | 130 +++++++++++++++++++++ .../rostests/apitests/crt/msvcrt_crt_apitest.cmake | 1 + .../rostests/apitests/crt/static_crt_apitest.cmake | 1 + modules/rostests/apitests/crt/testlist.c | 2 + 4 files changed, 134 insertions(+) diff --git a/modules/rostests/apitests/crt/__64tof.c b/modules/rostests/apitests/crt/__64tof.c new file mode 100644 index 00000000000..224df034699 --- /dev/null +++ b/modules/rostests/apitests/crt/__64tof.c @@ -0,0 +1,130 @@ +/* + * PROJECT: ReactOS API tests + * LICENSE: GPL-2.0-or-later (
https://spdx.org/licenses/GPL-2.0-or-later
) + * PURPOSE: Tests for __i64tod/u64tod/i64tos/u64tos on ARM + * COPYRIGHT: Copyright 2021 Stanislav Motylkov <x86corez(a)gmail.com> + */ + +#include <apitest.h> + +typedef struct _I64TOD_TEST_DATA +{ + long long given; + union + { + double value; + unsigned long long raw; + } expected; +} I64TOD_TEST_DATA; + +typedef struct _U64TOD_TEST_DATA +{ + unsigned long long given; + union + { + double value; + unsigned long long raw; + } expected; +} U64TOD_TEST_DATA; + +typedef struct _I64TOS_TEST_DATA +{ + long long given; + union + { + float value; + unsigned int raw; + } expected; +} I64TOS_TEST_DATA; + +typedef struct _U64TOS_TEST_DATA +{ + unsigned long long given; + union + { + float value; + unsigned int raw; + } expected; +} U64TOS_TEST_DATA; + +START_TEST(__64tof) +{ + I64TOD_TEST_DATA i64tod[] = + { + { 1383034209LL, 1383034209.0 }, /* test 32bit number */ + { -1383034209LL, -1383034209.0 }, /* test negative 32bit number */ + { 354056757614LL, 354056757614.0 }, /* test 64bit int */ + { -354056757614LL, -354056757614.0 }, /* test negative 64bit int */ + { 18446744073709550000LL, -1616.0 }, /* test 20bit in float */ + { 0x8000000000000000LL, -9223372036854775800.0 }, /* test big 64bit int */ + { 0xFFFFFFFFFFFFFFFFLL, -1.0 }, /* test -1 */ + { 0LL, +0.0 }, /* test 0 */ + }; + U64TOD_TEST_DATA u64tod[] = + { + { 1383034209ULL, 1383034209.0 }, /* test 32bit number */ + { 354056757614ULL, 354056757614.0 }, /* test 64bit int */ + { 18445937028656326656ULL, 18445937028656326656.0 }, /* test unsigned 64bit */ + { 18446744073709550000ULL, 18446744073709550000.0 }, /* test 20bit in float */ + { 18446744073709551615ULL, 18446744073709552000.0 }, /* test big 64bit number */ + { 0ULL, +0.0 }, /* test 0 */ + }; + I64TOS_TEST_DATA i64tos[] = + { + { 1383034LL, 1383034.0f }, /* test 32bit number */ + { -1383034LL, -1383034.0f }, /* test negative 32bit number */ + { 354056765440LL, 354056765440.0f }, /* test 64bit int */ + { -354056765440LL, -354056765440.0f }, /* test negative 64bit int */ + { 18446744073709550000LL, -1616.0f }, /* test 20bit in float */ + { 0x8000000000000000LL, -9223372036854775800.0f }, /* test big 64bit int */ + { 0xFFFFFFFFFFFFFFFFLL, -1.0f }, /* test -1 */ + { 0LL, +0.0f }, /* test 0 */ + }; + U64TOS_TEST_DATA u64tos[] = + { + { 1383034ULL, 1383034.0f }, /* test 32bit number */ + { 354056765440ULL, 354056765440.0f }, /* test 64bit int */ + { 18445937032174764032ULL, 18445937032174764032.0f }, /* test unsigned 64bit */ + { 18446744073709550000ULL, 18446744073709550000.0f }, /* test 20bit in float */ + { 18446744073709551615ULL, 18446744073709552000.0f }, /* test big 64bit number */ + { 0ULL, +0.0f }, /* test 0 */ + }; + + unsigned int i; + + for (i = 0; i < _countof(i64tod); ++i) + { + double actual; + + actual = (double)i64tod[i].given; + ok(actual == i64tod[i].expected.value, "(i64tod) %d: Expected %lf, but %lld -> %lf\n", + i, i64tod[i].expected.value, i64tod[i].given, actual); + } + + for (i = 0; i < _countof(u64tod); ++i) + { + double actual; + + actual = (double)u64tod[i].given; + ok(actual == u64tod[i].expected.value, "(u64tod) %d: Expected %lf, but %llu -> %lf\n", + i, u64tod[i].expected.value, u64tod[i].given, actual); + } + + for (i = 0; i < _countof(i64tos); ++i) + { + float actual; + + actual = (float)i64tos[i].given; + ok(actual == i64tos[i].expected.value, "(i64tos) %d: Expected %f, but %lld -> %f\n", + i, i64tos[i].expected.value, i64tos[i].given, actual); + } + + for (i = 0; i < _countof(u64tos); ++i) + { + float actual; + + actual = (float)u64tos[i].given; + ok(actual == u64tos[i].expected.value, "(u64tos) %d: Expected %f, but %llu -> %f\n", + i, u64tos[i].expected.value, u64tos[i].given, actual); + } +} diff --git a/modules/rostests/apitests/crt/msvcrt_crt_apitest.cmake b/modules/rostests/apitests/crt/msvcrt_crt_apitest.cmake index dcef3b0d582..82283e5a3a6 100644 --- a/modules/rostests/apitests/crt/msvcrt_crt_apitest.cmake +++ b/modules/rostests/apitests/crt/msvcrt_crt_apitest.cmake @@ -1376,6 +1376,7 @@ elseif(ARCH STREQUAL "arm") list(APPEND SOURCE_MSVCRT __rt_div.c __fto64.c + __64tof.c ) endif() diff --git a/modules/rostests/apitests/crt/static_crt_apitest.cmake b/modules/rostests/apitests/crt/static_crt_apitest.cmake index 17ff8f8d733..a3e35c412b3 100644 --- a/modules/rostests/apitests/crt/static_crt_apitest.cmake +++ b/modules/rostests/apitests/crt/static_crt_apitest.cmake @@ -30,6 +30,7 @@ elseif(ARCH STREQUAL "arm") list(APPEND SOURCE_STATIC __rt_div.c __fto64.c + __64tof.c ) endif() diff --git a/modules/rostests/apitests/crt/testlist.c b/modules/rostests/apitests/crt/testlist.c index 1997603fbca..e8b4c7670fb 100644 --- a/modules/rostests/apitests/crt/testlist.c +++ b/modules/rostests/apitests/crt/testlist.c @@ -12,6 +12,7 @@ extern void func_atexit(void); #if defined(_M_ARM) extern void func___rt_div(void); extern void func___fto64(void); +extern void func___64tof(void); #endif #endif #if defined(TEST_NTDLL) @@ -62,6 +63,7 @@ const struct test winetest_testlist[] = #if defined(_M_ARM) { "__rt_div", func___rt_div }, { "__fto64", func___fto64 }, + { "__64tof", func___64tof }, #endif #endif #if defined(TEST_STATIC_CRT)
3 years, 3 months
1
0
0
0
[reactos] 01/02: [CRT/ARM] Integer to float conversion implementation (#3866)
by Roman Masanin
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9c4e3234ba34927c14ec1…
commit 9c4e3234ba34927c14ec1fd8c75952c37ba0fa87 Author: Roman Masanin <36927roma(a)gmail.com> AuthorDate: Wed Jul 28 21:16:04 2021 +0300 Commit: Stanislav Motylkov <x86corez(a)gmail.com> CommitDate: Thu Sep 9 16:02:03 2021 +0300 [CRT/ARM] Integer to float conversion implementation (#3866) CORE-17713 CORE-17706 CORE-17604 --- sdk/lib/crt/math/arm/__64tof.h | 98 +++++++++++++++++++++++++++++++++++++++++ sdk/lib/crt/math/arm/__i64tod.c | 14 ++++++ sdk/lib/crt/math/arm/__i64tod.s | 24 ---------- sdk/lib/crt/math/arm/__i64tos.c | 13 ++++++ sdk/lib/crt/math/arm/__i64tos.s | 24 ---------- sdk/lib/crt/math/arm/__u64tod.c | 13 ++++++ sdk/lib/crt/math/arm/__u64tod.s | 24 ---------- sdk/lib/crt/math/arm/__u64tos.c | 12 +++++ sdk/lib/crt/math/arm/__u64tos.s | 24 ---------- sdk/lib/crt/math/math.cmake | 9 ++-- sdk/lib/crt/msvcrtex.cmake | 9 ++-- 11 files changed, 160 insertions(+), 104 deletions(-) diff --git a/sdk/lib/crt/math/arm/__64tof.h b/sdk/lib/crt/math/arm/__64tof.h new file mode 100644 index 00000000000..7aecb6f4e6e --- /dev/null +++ b/sdk/lib/crt/math/arm/__64tof.h @@ -0,0 +1,98 @@ +/* + * PROJECT: ReactOS CRT library + * LICENSE: MIT (
https://spdx.org/licenses/MIT
) + * PURPOSE: Integer to float conversion (__i64tod/u64tod/i64tos/u64tos) + * COPYRIGHT: Copyright 2021 Roman Masanin <36927roma(a)gmail.com> + */ + +#ifdef _USE_64_BITS_ +typedef double FLOAT_TYPE; +typedef unsigned long long FINT_TYPE; +#define FRACTION_LEN 52 +#define EXPONENT_LEN 11 +#define SHIFT_OFFSET EXPONENT_LEN +#else +typedef float FLOAT_TYPE; +typedef unsigned int FINT_TYPE; +#define FRACTION_LEN 23 +#define EXPONENT_LEN 8 +#define SHIFT_OFFSET (EXPONENT_LEN + 32) +#endif + +#ifdef _USE_SIGNED_ +typedef long long INT64SU; +#else +typedef unsigned long long INT64SU; +#endif + +typedef union _FLOAT_RESULT +{ + FLOAT_TYPE value; + FINT_TYPE raw; +} FLOAT_RESULT; + +#define SIGN_MASK 0x8000000000000000ULL + +#define EXPONENT_ZERO ((1 << (EXPONENT_LEN - 1)) - 1) + +#define NEGATE(x) (~(x) + 1) + +FLOAT_TYPE +__64tof(INT64SU value) +{ + FLOAT_RESULT result; + FINT_TYPE exponent = EXPONENT_ZERO + FRACTION_LEN; + int count = 0; + unsigned long long mask = SIGN_MASK; + + if (value == 0) + return (FLOAT_TYPE)0; + +#ifdef _USE_SIGNED_ + if (value & SIGN_MASK) + { + value = NEGATE(value); + /* set Sign bit using exponent */ + exponent |= 1 << EXPONENT_LEN; + } +#endif + + for (; count < 64; count++) + { + if (value & mask) + break; + mask = mask >> 1; + } + + count -= SHIFT_OFFSET; + /* exponent is FRACTION_LEN - count */ + exponent -= count; + result.raw = exponent << FRACTION_LEN; + + mask--; + value = value & mask; + if (value == 0) + return result.value; + + if (count == 0) + { + result.raw |= value; + } + else if (count < 0) + { + count = NEGATE(count) - 1; + value = value >> count; + mask = value & 1; + result.raw |= value >> 1; + + /* round up if left most bit of lost data is 1 */ + if (mask) + result.raw++; + } + else + { + result.raw |= value << count; + } + + return result.value; +} diff --git a/sdk/lib/crt/math/arm/__i64tod.c b/sdk/lib/crt/math/arm/__i64tod.c new file mode 100644 index 00000000000..789c4ff30f2 --- /dev/null +++ b/sdk/lib/crt/math/arm/__i64tod.c @@ -0,0 +1,14 @@ +/* + * PROJECT: ReactOS CRT library + * LICENSE: MIT (
https://spdx.org/licenses/MIT
) + * PURPOSE: Implementation of __i64tod + * COPYRIGHT: Copyright 2021 Roman Masanin <36927roma(a)gmail.com> + */ + +#define __64tof __i64tod +#define _USE_64_BITS_ +#define _USE_SIGNED_ + +#include "__64tof.h" + +/* __i64tod is implemented in __64tof.h */ diff --git a/sdk/lib/crt/math/arm/__i64tod.s b/sdk/lib/crt/math/arm/__i64tod.s deleted file mode 100644 index 88b0b0574cd..00000000000 --- a/sdk/lib/crt/math/arm/__i64tod.s +++ /dev/null @@ -1,24 +0,0 @@ -/* - * COPYRIGHT: BSD - See COPYING.ARM in the top level directory - * PROJECT: ReactOS CRT library - * PURPOSE: Implementation of __i64tod - * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) - */ - -/* INCLUDES ******************************************************************/ - -#include <kxarm.h> - -/* CODE **********************************************************************/ - - TEXTAREA - - LEAF_ENTRY __i64tod - - __assertfail - bx lr - - LEAF_END __i64tod - - END -/* EOF */ diff --git a/sdk/lib/crt/math/arm/__i64tos.c b/sdk/lib/crt/math/arm/__i64tos.c new file mode 100644 index 00000000000..58e8ba28d8b --- /dev/null +++ b/sdk/lib/crt/math/arm/__i64tos.c @@ -0,0 +1,13 @@ +/* + * PROJECT: ReactOS CRT library + * LICENSE: MIT (
https://spdx.org/licenses/MIT
) + * PURPOSE: Implementation of __i64tos + * COPYRIGHT: Copyright 2021 Roman Masanin <36927roma(a)gmail.com> + */ + +#define __64tof __i64tos +#define _USE_SIGNED_ + +#include "__64tof.h" + +/* __i64tos is implemented in __64tof.h */ diff --git a/sdk/lib/crt/math/arm/__i64tos.s b/sdk/lib/crt/math/arm/__i64tos.s deleted file mode 100644 index 6f6c730bd00..00000000000 --- a/sdk/lib/crt/math/arm/__i64tos.s +++ /dev/null @@ -1,24 +0,0 @@ -/* - * COPYRIGHT: BSD - See COPYING.ARM in the top level directory - * PROJECT: ReactOS CRT library - * PURPOSE: Implementation of __i64tos - * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) - */ - -/* INCLUDES ******************************************************************/ - -#include <kxarm.h> - -/* CODE **********************************************************************/ - - TEXTAREA - - LEAF_ENTRY __i64tos - - __assertfail - bx lr - - LEAF_END __i64tos - - END -/* EOF */ diff --git a/sdk/lib/crt/math/arm/__u64tod.c b/sdk/lib/crt/math/arm/__u64tod.c new file mode 100644 index 00000000000..f9c7ad3db6a --- /dev/null +++ b/sdk/lib/crt/math/arm/__u64tod.c @@ -0,0 +1,13 @@ +/* + * PROJECT: ReactOS CRT library + * LICENSE: MIT (
https://spdx.org/licenses/MIT
) + * PURPOSE: Implementation of __u64tod + * COPYRIGHT: Copyright 2021 Roman Masanin <36927roma(a)gmail.com> + */ + +#define __64tof __u64tod +#define _USE_64_BITS_ + +#include "__64tof.h" + +/* __u64tod is implemented in __64tof.h */ diff --git a/sdk/lib/crt/math/arm/__u64tod.s b/sdk/lib/crt/math/arm/__u64tod.s deleted file mode 100644 index cf56f96fc80..00000000000 --- a/sdk/lib/crt/math/arm/__u64tod.s +++ /dev/null @@ -1,24 +0,0 @@ -/* - * COPYRIGHT: BSD - See COPYING.ARM in the top level directory - * PROJECT: ReactOS CRT library - * PURPOSE: Implementation of __u64tod - * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) - */ - -/* INCLUDES ******************************************************************/ - -#include <kxarm.h> - -/* CODE **********************************************************************/ - - TEXTAREA - - LEAF_ENTRY __u64tod - - __assertfail - bx lr - - LEAF_END __u64tod - - END -/* EOF */ diff --git a/sdk/lib/crt/math/arm/__u64tos.c b/sdk/lib/crt/math/arm/__u64tos.c new file mode 100644 index 00000000000..c50fff1937a --- /dev/null +++ b/sdk/lib/crt/math/arm/__u64tos.c @@ -0,0 +1,12 @@ +/* + * PROJECT: ReactOS CRT library + * LICENSE: MIT (
https://spdx.org/licenses/MIT
) + * PURPOSE: Implementation of __u64tos + * COPYRIGHT: Copyright 2021 Roman Masanin <36927roma(a)gmail.com> + */ + +#define __64tof __u64tos + +#include "__64tof.h" + +/* __u64tos is implemented in __64tof.h */ diff --git a/sdk/lib/crt/math/arm/__u64tos.s b/sdk/lib/crt/math/arm/__u64tos.s deleted file mode 100644 index 828bc7fe55c..00000000000 --- a/sdk/lib/crt/math/arm/__u64tos.s +++ /dev/null @@ -1,24 +0,0 @@ -/* - * COPYRIGHT: BSD - See COPYING.ARM in the top level directory - * PROJECT: ReactOS CRT library - * PURPOSE: Implementation of __u64tos - * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) - */ - -/* INCLUDES ******************************************************************/ - -#include <kxarm.h> - -/* CODE **********************************************************************/ - - TEXTAREA - - LEAF_ENTRY __u64tos - - __assertfail - bx lr - - LEAF_END __u64tos - - END -/* EOF */ diff --git a/sdk/lib/crt/math/math.cmake b/sdk/lib/crt/math/math.cmake index 7e04dcc503b..a534fc8832e 100644 --- a/sdk/lib/crt/math/math.cmake +++ b/sdk/lib/crt/math/math.cmake @@ -86,6 +86,11 @@ elseif(ARCH STREQUAL "arm") math/arm/__stoi64.c math/arm/__stou64.c math/arm/__fto64.h + math/arm/__i64tod.c + math/arm/__u64tod.c + math/arm/__i64tos.c + math/arm/__u64tos.c + math/arm/__64tof.h ) list(APPEND CRT_MATH_SOURCE math/fabsf.c @@ -103,10 +108,6 @@ elseif(ARCH STREQUAL "arm") math/arm/log10.s math/arm/pow.s math/arm/tan.s - math/arm/__i64tod.s - math/arm/__i64tos.s - math/arm/__u64tod.s - math/arm/__u64tos.s math/arm/__rt_sdiv64.s math/arm/__rt_srsh.s math/arm/__rt_udiv64.s diff --git a/sdk/lib/crt/msvcrtex.cmake b/sdk/lib/crt/msvcrtex.cmake index 0ba3ee2aa7e..511473788e6 100644 --- a/sdk/lib/crt/msvcrtex.cmake +++ b/sdk/lib/crt/msvcrtex.cmake @@ -48,13 +48,14 @@ elseif(ARCH STREQUAL "arm") math/arm/__stoi64.c math/arm/__stou64.c math/arm/__fto64.h + math/arm/__i64tod.c + math/arm/__u64tod.c + math/arm/__i64tos.c + math/arm/__u64tos.c + math/arm/__64tof.h ) list(APPEND MSVCRTEX_ASM_SOURCE except/arm/chkstk_asm.s - math/arm/__i64tod.s - math/arm/__i64tos.s - math/arm/__u64tod.s - math/arm/__u64tos.s math/arm/__rt_sdiv64.s math/arm/__rt_srsh.s math/arm/__rt_udiv64.s
3 years, 3 months
1
0
0
0
[reactos] 01/01: [CRT_APITEST] Fix __fto64 test according to MS CRT behavior on x86 and x64
by Stanislav Motylkov
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6ec6233e9cae51ed78741…
commit 6ec6233e9cae51ed7874176cf2545b2851eaa4cb Author: Stanislav Motylkov <x86corez(a)gmail.com> AuthorDate: Thu Sep 9 00:56:03 2021 +0300 Commit: Stanislav Motylkov <x86corez(a)gmail.com> CommitDate: Thu Sep 9 00:56:03 2021 +0300 [CRT_APITEST] Fix __fto64 test according to MS CRT behavior on x86 and x64 Addendum to 99ba9846. CORE-17703 CORE-17604 --- modules/rostests/apitests/crt/__fto64.c | 40 ++++++++++++++++----------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/modules/rostests/apitests/crt/__fto64.c b/modules/rostests/apitests/crt/__fto64.c index 9b958aff1d2..c6c8b1dcf05 100644 --- a/modules/rostests/apitests/crt/__fto64.c +++ b/modules/rostests/apitests/crt/__fto64.c @@ -79,13 +79,13 @@ START_TEST(__fto64) DTOU64_TEST_DATA dtou64[] = { { 1383034209.0, 1383034209ULL }, /* test 32bit number */ - { -1383034209.0, 18446744073709551615ULL }, /* test negative 32bit number */ + { -1383034209.0, 18446744072326517407ULL }, /* test negative 32bit number */ { 1383034209.1383034209, 1383034209ULL }, /* test rounding 32bit */ - { -1383034209.1383034209, 18446744073709551615ULL }, /* test negative rounding 32bit */ + { -1383034209.1383034209, 18446744072326517407ULL }, /* test negative rounding 32bit */ { 1383034209.83034209, 1383034209ULL }, /* test rounding up 32bit */ - { -1383034209.83034209, 18446744073709551615ULL }, /* test negative rounding up 32bit */ + { -1383034209.83034209, 18446744072326517407ULL }, /* test negative rounding up 32bit */ { 354056757614.0, 354056757614ULL }, /* test 64bit int */ - { -354056757614.0, 18446744073709551615ULL }, /* test negative 64bit int */ + { -354056757614.0, 18446743719652794002ULL }, /* test negative 64bit int */ { 354056757614.83034209, 354056757614ULL }, /* test 64bit rounding */ { 18445937028656326656.0, 18445937028656326656ULL }, /* test unsigned 64bit */ { 1.0000001, 1ULL }, @@ -96,12 +96,12 @@ START_TEST(__fto64) { -0.0, 0ULL }, /* test -0 */ { +0.0, 0ULL }, /* test +0 */ - { .given.raw = 0x7FF0000000000000ULL, 18446744073709551615ULL }, /* test +INFINITY */ - { .given.raw = 0xFFF0000000000000ULL, 18446744073709551615ULL }, /* test -INFINITY */ - { .given.raw = 0x7FF0000000000001ULL, 18446744073709551615ULL }, /* test NaN1 */ - { .given.raw = 0x7FF8000000000001ULL, 18446744073709551615ULL }, /* test NaN2 */ - { .given.raw = 0x7FFFFFFFFFFFFFFFULL, 18446744073709551615ULL }, /* test NaN3 */ - { .given.raw = 0x7FF80000000000F1ULL, 18446744073709551615ULL }, /* test NaN4 */ + { .given.raw = 0x7FF0000000000000ULL, 0x8000000000000000LL }, /* test +INFINITY */ + { .given.raw = 0xFFF0000000000000ULL, 0x8000000000000000LL }, /* test -INFINITY */ + { .given.raw = 0x7FF0000000000001ULL, 0x8000000000000000LL }, /* test NaN1 */ + { .given.raw = 0x7FF8000000000001ULL, 0x8000000000000000LL }, /* test NaN2 */ + { .given.raw = 0x7FFFFFFFFFFFFFFFULL, 0x8000000000000000LL }, /* test NaN3 */ + { .given.raw = 0x7FF80000000000F1ULL, 0x8000000000000000LL }, /* test NaN4 */ }; STOI64_TEST_DATA stoi64[] = { @@ -133,13 +133,13 @@ START_TEST(__fto64) STOU64_TEST_DATA stou64[] = { { 1383034.0f, 1383034ULL }, /* test 32bit number */ - { -1383034.0f, 18446744073709551615ULL }, /* test negative 32bit number */ + { -1383034.0f, 18446744073708168582ULL }, /* test negative 32bit number */ { 1383034.1383034209f, 1383034ULL }, /* test rounding 32bit */ - { -1383034.1383034209f, 18446744073709551615ULL }, /* test negative rounding 32bit */ + { -1383034.1383034209f, 18446744073708168582ULL }, /* test negative rounding 32bit */ { 1383034.83034209f, 1383034ULL }, /* test rounding up 32bit */ - { -1383034.83034209f, 18446744073709551615ULL }, /* test negative rounding up 32bit */ + { -1383034.83034209f, 18446744073708168582ULL }, /* test negative rounding up 32bit */ { 354056765440.0f, 354056765440ULL }, /* test 64bit int */ - { -354056765440.0f, 18446744073709551615ULL }, /* test negative 64bit int */ + { -354056765440.0f, 18446743719652786176ULL }, /* test negative 64bit int */ { 3000000.75f, 3000000ULL }, /* test 64bit rounding */ { 18445937032174764032.0f, 18445937032174764032ULL }, /* test unsigned 64bit */ { 1.0000001f, 1ULL }, @@ -150,12 +150,12 @@ START_TEST(__fto64) { -0.0f, 0LL }, /* test -0 */ { +0.0f, 0LL }, /* test +0 */ - {.given.raw = 0x7F800000U, 18446744073709551615ULL }, /* test +INFINITY */ - {.given.raw = 0xFF800000U, 18446744073709551615ULL }, /* test -INFINITY */ - {.given.raw = 0x7F800001U, 18446744073709551615ULL }, /* test NaN1 */ - {.given.raw = 0x7FC00001U, 18446744073709551615ULL }, /* test NaN2 */ - {.given.raw = 0x7F8FFFFFU, 18446744073709551615ULL }, /* test NaN3 */ - {.given.raw = 0x7F8000F1U, 18446744073709551615ULL }, /* test NaN4 */ + {.given.raw = 0x7F800000U, 0x8000000000000000LL }, /* test +INFINITY */ + {.given.raw = 0xFF800000U, 0x8000000000000000LL }, /* test -INFINITY */ + {.given.raw = 0x7F800001U, 0x8000000000000000LL }, /* test NaN1 */ + {.given.raw = 0x7FC00001U, 0x8000000000000000LL }, /* test NaN2 */ + {.given.raw = 0x7F8FFFFFU, 0x8000000000000000LL }, /* test NaN3 */ + {.given.raw = 0x7F8000F1U, 0x8000000000000000LL }, /* test NaN4 */ }; unsigned int i;
3 years, 3 months
1
0
0
0
[reactos] 01/01: [CRT_APITEST] Add missing static CRT tests on ARM
by Stanislav Motylkov
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=83318b2c430bb58787442…
commit 83318b2c430bb58787442c489d214ec1fa609138 Author: Stanislav Motylkov <x86corez(a)gmail.com> AuthorDate: Wed Sep 8 20:10:11 2021 +0300 Commit: Stanislav Motylkov <x86corez(a)gmail.com> CommitDate: Wed Sep 8 20:10:11 2021 +0300 [CRT_APITEST] Add missing static CRT tests on ARM Addendum to c23ce9df. CORE-17604 --- modules/rostests/apitests/crt/testlist.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/modules/rostests/apitests/crt/testlist.c b/modules/rostests/apitests/crt/testlist.c index dacd260e161..1997603fbca 100644 --- a/modules/rostests/apitests/crt/testlist.c +++ b/modules/rostests/apitests/crt/testlist.c @@ -4,12 +4,16 @@ #include <apitest.h> #if defined(TEST_MSVCRT) -extern void func___rt_div(void); -extern void func___fto64(void); extern void func__vscprintf(void); extern void func__vscwprintf(void); extern void func_atexit(void); #endif +#if defined(TEST_STATIC_CRT) || defined(TEST_MSVCRT) +#if defined(_M_ARM) +extern void func___rt_div(void); +extern void func___fto64(void); +#endif +#endif #if defined(TEST_NTDLL) extern void func__vscwprintf(void); #endif @@ -55,7 +59,10 @@ const struct test winetest_testlist[] = // ... #endif #if defined(TEST_STATIC_CRT) || defined(TEST_MSVCRT) - // ... +#if defined(_M_ARM) + { "__rt_div", func___rt_div }, + { "__fto64", func___fto64 }, +#endif #endif #if defined(TEST_STATIC_CRT) #elif defined(TEST_MSVCRT) @@ -63,9 +70,6 @@ const struct test winetest_testlist[] = { "crtdata", func_crtdata }, #if defined(_M_IX86) { "__getmainargs", func___getmainargs }, -#elif defined(_M_ARM) - { "__rt_div", func___rt_div }, - { "__fto64", func___fto64 }, #endif { "_vscprintf", func__vscprintf }, { "_vscwprintf", func__vscwprintf },
3 years, 3 months
1
0
0
0
[reactos] 01/01: [MPR] Fix copy paste error when converting hex char to int.
by Robert Naumann
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7f4158fc64e51b2db251f…
commit 7f4158fc64e51b2db251fe5418a9670516886961 Author: Robert Naumann <gonzomdx(a)gmail.com> AuthorDate: Wed Sep 8 18:59:08 2021 +0200 Commit: Robert Naumann <gonzomdx(a)gmail.com> CommitDate: Wed Sep 8 18:59:08 2021 +0200 [MPR] Fix copy paste error when converting hex char to int. Wine Commit 63737942a06183f6b2e7fa8f95a07c918c9bf29b Original patch by Sergei Abramov. CORE-13863 --- dll/win32/mpr/pwcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dll/win32/mpr/pwcache.c b/dll/win32/mpr/pwcache.c index aa09522a5f9..f330a2a000a 100644 --- a/dll/win32/mpr/pwcache.c +++ b/dll/win32/mpr/pwcache.c @@ -45,7 +45,7 @@ static inline signed char ctox( CHAR x ) return x - '0'; if( ( x >= 'A' ) && ( x <= 'F' ) ) return x - 'A' + 10; - if( ( x >= 'a' ) && ( x <= 'a' ) ) + if( ( x >= 'a' ) && ( x <= 'f' ) ) return x - 'a' + 10; return -1; }
3 years, 3 months
1
0
0
0
[reactos] 01/01: [CRT_APITEST] Do not test functions that are missing on ARM
by Stanislav Motylkov
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a3af97df133d8773379e1…
commit a3af97df133d8773379e1e339ac79933dc8fc874 Author: Stanislav Motylkov <x86corez(a)gmail.com> AuthorDate: Wed Sep 8 19:28:59 2021 +0300 Commit: Stanislav Motylkov <x86corez(a)gmail.com> CommitDate: Wed Sep 8 19:44:56 2021 +0300 [CRT_APITEST] Do not test functions that are missing on ARM Addendum to 5f548654. ROSTESTS-374 CORE-17604 --- dll/win32/msvcrt/msvcrt.spec | 28 ++++++++++++++-------------- modules/rostests/apitests/crt/crtdata.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 14 deletions(-) diff --git a/dll/win32/msvcrt/msvcrt.spec b/dll/win32/msvcrt/msvcrt.spec index 4ecdd97de49..62295ac46a3 100644 --- a/dll/win32/msvcrt/msvcrt.spec +++ b/dll/win32/msvcrt/msvcrt.spec @@ -255,8 +255,8 @@ @ cdecl ___lc_collate_cp_func() @ cdecl ___lc_handle_func() @ cdecl ___mb_cur_max_func() -@ cdecl ___setlc_active_func() -@ cdecl ___unguarded_readlc_active_add_func() +@ cdecl -arch=i386,x86_64 ___setlc_active_func() +@ cdecl -arch=i386,x86_64 ___unguarded_readlc_active_add_func() @ extern __argc @ extern __argv @ extern __badioinfo __badioinfo @@ -272,13 +272,13 @@ @ stub -version=0x600+ __dstbias @ cdecl __fpecode() @ cdecl __getmainargs(ptr ptr ptr long ptr) -@ extern __initenv +@ extern -arch=i386,x86_64 __initenv @ cdecl __iob_func() @ cdecl __isascii(long) @ cdecl __iscsym(long) @ cdecl __iscsymf(long) -@ extern __lc_codepage -@ extern __lc_collate_cp MSVCRT___lc_collate_cp +@ extern -arch=i386,x86_64 __lc_codepage +@ extern -arch=i386,x86_64 __lc_collate_cp MSVCRT___lc_collate_cp @ extern __lc_handle MSVCRT___lc_handle @ cdecl __lconv_init() @ stub -version=0x600+ -arch=i386 __libm_sse2_acos @@ -337,7 +337,7 @@ @ cdecl __pwctype_func() @ cdecl __pxcptinfoptrs() @ cdecl __set_app_type(long) -@ extern __setlc_active +@ extern -arch=i386,x86_64 __setlc_active @ cdecl __setusermatherr(ptr) @ stub -version=0x600+ __strncnt @ cdecl __threadhandle() kernel32.GetCurrentThread @@ -345,13 +345,13 @@ @ cdecl __toascii(long) @ cdecl __unDName(ptr str long ptr ptr long) @ cdecl __unDNameEx(ptr str long ptr ptr ptr long) -@ extern __unguarded_readlc_active +@ extern -arch=i386,x86_64 __unguarded_readlc_active @ extern __wargv __wargv @ cdecl __wcserror(wstr) @ cdecl -version=0x600+ __wcserror_s(ptr long wstr) @ stub -version=0x600+ __wcsncnt @ cdecl __wgetmainargs(ptr ptr ptr long ptr) -@ extern __winitenv +@ extern -arch=i386,x86_64 __winitenv @ cdecl -arch=i386 _abnormal_termination() # stub _abs64 @ cdecl _access(str long) @@ -460,14 +460,14 @@ @ extern _daylight @ stub -version=0x600+ _difftime32 @ stub -version=0x600+ _difftime64 -@ extern _dstbias +@ extern -arch=i386,x86_64 _dstbias @ cdecl _dup(long) @ cdecl _dup2(long long) @ cdecl _ecvt(double long ptr ptr) @ stub -version=0x600+ _ecvt_s @ cdecl _endthread() @ cdecl _endthreadex(long) -@ extern _environ +@ extern -arch=i386,x86_64 _environ @ cdecl _eof(long) @ cdecl _errno() @ cdecl -arch=i386 _except_handler2(ptr ptr ptr ptr) @@ -491,7 +491,7 @@ @ cdecl _fgetchar() @ cdecl _fgetwchar() @ cdecl _filbuf(ptr) -@ extern _fileinfo +@ extern -arch=i386,x86_64 _fileinfo @ cdecl _filelength(long) @ cdecl -ret64 _filelengthi64(long) @ cdecl _fileno(ptr) @@ -886,7 +886,7 @@ @ extern _onexit # Declaring it as extern let us use the symbol from msvcrtex while having the __imp_ symbol defined in the import lib @ varargs _open(str long) @ cdecl _open_osfhandle(long long) -@ extern _osplatform +@ extern -arch=i386,x86_64 _osplatform @ extern _osver @ cdecl -arch=i386 _outp(long long) MSVCRT__outp @ cdecl -arch=i386 _outpd(long long) MSVCRT__outpd @@ -1186,7 +1186,7 @@ @ stub -version=0x600+ _wctomb_l @ stub -version=0x600+ _wctomb_s_l @ extern _wctype -@ extern _wenviron +@ extern -arch=i386,x86_64 _wenviron @ varargs _wexecl(wstr wstr) @ varargs _wexecle(wstr wstr) @ varargs _wexeclp(wstr wstr) @@ -1216,7 +1216,7 @@ @ extern _winmajor @ extern _winminor @ stub -version=0x600+ _winput_s -@ extern _winver +@ extern -arch=i386,x86_64 _winver @ cdecl _wmakepath(ptr wstr wstr wstr wstr) @ stub -version=0x600+ _wmakepath_s @ cdecl _wmkdir(wstr) diff --git a/modules/rostests/apitests/crt/crtdata.c b/modules/rostests/apitests/crt/crtdata.c index 2022d43e81e..baf73a2f278 100644 --- a/modules/rostests/apitests/crt/crtdata.c +++ b/modules/rostests/apitests/crt/crtdata.c @@ -62,6 +62,7 @@ void Test___badioinfo(void) ok(__badioinfo[0] != NULL, "__badioinfo is NULL\n"); } +#ifndef _M_ARM void Test___initenv(void) { _CRTIMP extern char** __initenv; @@ -93,6 +94,7 @@ void Test___lc_collate_cp(void) ok_int(___lc_collate_cp_func(), 0); __lc_collate_cp--; } +#endif // !_M_ARM void Test___lc_handle(void) { @@ -145,6 +147,7 @@ void Test___pioinfo(void) } +#ifndef _M_ARM void Test___setlc_active(void) { _CRTIMP extern unsigned int __setlc_active; @@ -166,6 +169,7 @@ void Test___unguarded_readlc_active(void) _CRTIMP unsigned int* ___unguarded_readlc_active_add_func(void); ok_ptr(___unguarded_readlc_active_add_func(), p); } +#endif // !_M_ARM void Test___wargv(void) { @@ -180,6 +184,7 @@ void Test___wargv(void) #endif } +#ifndef _M_ARM void Test___winitenv(void) { _CRTIMP extern wchar_t** __winitenv; @@ -189,6 +194,7 @@ void Test___winitenv(void) ok_ptr(__p___winitenv(), &__winitenv); #endif } +#endif void Test__acmdln(void) { @@ -293,6 +299,7 @@ void Test__daylight(void) #endif } +#ifndef _M_ARM void Test__dstbias(void) { void* p = &_dstbias; @@ -334,6 +341,7 @@ void Test__fileinfo(void) ok_ptr(__p__fileinfo(), &_fileinfo); #endif } +#endif // !_M_ARM void Test__fmode(void) { @@ -408,6 +416,7 @@ void Test__mbctype(void) #endif } +#ifndef _M_ARM void Test__osplatform(void) { ok_int(_osplatform, s_osvi.dwPlatformId); @@ -416,6 +425,7 @@ void Test__osplatform(void) ok_ptr(_get_osplatform(), _osplatform); #endif } +#endif void Test__osver(void) { @@ -510,6 +520,7 @@ void Test__wcmdln(void) #endif } +#ifndef _M_ARM void Test__wenviron(void) { void* p = &_wenviron; @@ -526,6 +537,7 @@ void Test__wenviron(void) ok_int(_get_wenviron(), _wenviron); #endif } +#endif void Test__winmajor(void) { @@ -553,6 +565,7 @@ void Test__winminor(void) #endif } +#ifndef _M_ARM void Test__winver(void) { ok_int(_winver, (s_osvi.dwMajorVersion << 8) | s_osvi.dwMinorVersion); @@ -565,6 +578,7 @@ void Test__winver(void) ok_int(_get_winver(), _winver); #endif } +#endif void Test__wpgmptr(void) { @@ -598,16 +612,22 @@ START_TEST(crtdata) Test___argc(); Test___argv(); Test___badioinfo(); +#ifndef _M_ARM Test___initenv(); Test___lc_codepage(); Test___lc_collate_cp(); +#endif Test___lc_handle(); Test___mb_cur_max(); Test___pioinfo(); +#ifndef _M_ARM Test___setlc_active(); Test___unguarded_readlc_active(); +#endif Test___wargv(); +#ifndef _M_ARM Test___winitenv(); +#endif Test__acmdln(); #ifdef _M_IX86 Test__adjust_fdiv(); @@ -616,14 +636,18 @@ START_TEST(crtdata) Test__commode(); Test__ctype(); Test__daylight(); +#ifndef _M_ARM Test__dstbias(); Test__environ(); Test__fileinfo(); +#endif Test__fmode(); Test__iob(); Test__mbcasemap(); Test__mbctype(); +#ifndef _M_ARM Test__osplatform(); +#endif Test__osver(); Test__pgmptr(); Test__sys_errlist(); @@ -632,9 +656,13 @@ START_TEST(crtdata) Test__tzname(); Test__wcmdln(); Test__wctype(); +#ifndef _M_ARM Test__wenviron(); +#endif Test__winmajor(); Test__winminor(); +#ifndef _M_ARM Test__winver(); +#endif Test__wpgmptr(); }
3 years, 3 months
1
0
0
0
[reactos] 01/01: [CRT/ARM] Floating point control functions implementation (#3870)
by Roman Masanin
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=554bbb6bab9279cec8583…
commit 554bbb6bab9279cec8583f1e6e8f05997de0af4a Author: Roman Masanin <36927roma(a)gmail.com> AuthorDate: Sun Aug 1 17:30:41 2021 +0300 Commit: Stanislav Motylkov <x86corez(a)gmail.com> CommitDate: Wed Sep 8 16:04:48 2021 +0300 [CRT/ARM] Floating point control functions implementation (#3870) Implement controlfp, statusfp, fpreset, clearfp. CORE-17757 CORE-17604 --- sdk/include/crt/float.h | 8 ++++ sdk/lib/crt/float/arm/__getfp.s | 25 ++++++++++++ sdk/lib/crt/float/arm/__setfp.s | 25 ++++++++++++ sdk/lib/crt/float/arm/_clearfp.c | 22 ++++++++++ sdk/lib/crt/float/arm/_clearfp.s | 24 ----------- sdk/lib/crt/float/arm/_controlfp.c | 83 ++++++++++++++++++++++++++++++++++++++ sdk/lib/crt/float/arm/_controlfp.s | 24 ----------- sdk/lib/crt/float/arm/_fpreset.c | 13 ++++++ sdk/lib/crt/float/arm/_fpreset.s | 24 ----------- sdk/lib/crt/float/arm/_statusfp.c | 24 +++++++++++ sdk/lib/crt/float/arm/_statusfp.s | 24 ----------- sdk/lib/crt/float/arm/fpscr.h | 41 +++++++++++++++++++ sdk/lib/crt/float/float.cmake | 12 ++++-- 13 files changed, 249 insertions(+), 100 deletions(-) diff --git a/sdk/include/crt/float.h b/sdk/include/crt/float.h index cd3c191a4ed..b5681293421 100644 --- a/sdk/include/crt/float.h +++ b/sdk/include/crt/float.h @@ -77,6 +77,14 @@ #define _FPCLASS_PINF 0x0200 /* Positive Infinity */ #endif /* __MINGW_FPCLASS_DEFINED */ +/* _statusfp bit flags */ +#define _SW_INEXACT 0x00000001 /* inexact (precision) */ +#define _SW_UNDERFLOW 0x00000002 /* underflow */ +#define _SW_OVERFLOW 0x00000004 /* overflow */ +#define _SW_ZERODIVIDE 0x00000008 /* zero divide */ +#define _SW_INVALID 0x00000010 /* invalid */ +#define _SW_DENORMAL 0x00080000 /* denormal status bit */ + /* invalid subconditions (_SW_INVALID also set) */ #define _SW_UNEMULATED 0x0040 /* unemulated instruction */ #define _SW_SQRTNEG 0x0080 /* square root of a neg number */ diff --git a/sdk/lib/crt/float/arm/__getfp.s b/sdk/lib/crt/float/arm/__getfp.s new file mode 100644 index 00000000000..f55f966329a --- /dev/null +++ b/sdk/lib/crt/float/arm/__getfp.s @@ -0,0 +1,25 @@ +/* + * PROJECT: ReactOS CRT library + * LICENSE: MIT (
https://spdx.org/licenses/MIT
) + * PURPOSE: ARM fpscr getter + * COPYRIGHT: Copyright 2021 Roman Masanin <36927roma(a)gmail.com> + */ + +/* INCLUDES ******************************************************************/ + +#include <kxarm.h> + +/* CODE **********************************************************************/ + + TEXTAREA + + LEAF_ENTRY __getfp + + VMRS R0,FPSCR + + BX LR + + LEAF_END __getfp + + END +/* EOF */ diff --git a/sdk/lib/crt/float/arm/__setfp.s b/sdk/lib/crt/float/arm/__setfp.s new file mode 100644 index 00000000000..10491970adf --- /dev/null +++ b/sdk/lib/crt/float/arm/__setfp.s @@ -0,0 +1,25 @@ +/* + * PROJECT: ReactOS CRT library + * LICENSE: MIT (
https://spdx.org/licenses/MIT
) + * PURPOSE: ARM fpscr setter + * COPYRIGHT: Copyright 2021 Roman Masanin <36927roma(a)gmail.com> + */ + +/* INCLUDES ******************************************************************/ + +#include <kxarm.h> + +/* CODE **********************************************************************/ + + TEXTAREA + + LEAF_ENTRY __setfp + + VMSR FPSCR,R0 + + BX LR + + LEAF_END __setfp + + END +/* EOF */ diff --git a/sdk/lib/crt/float/arm/_clearfp.c b/sdk/lib/crt/float/arm/_clearfp.c new file mode 100644 index 00000000000..9b295e58900 --- /dev/null +++ b/sdk/lib/crt/float/arm/_clearfp.c @@ -0,0 +1,22 @@ +/* + * PROJECT: ReactOS CRT library + * LICENSE: MIT (
https://spdx.org/licenses/MIT
) + * PURPOSE: Implementation of _clearfp + * COPYRIGHT: Copyright 2021 Roman Masanin <36927roma(a)gmail.com> + */ + +#include "fpscr.h" + +unsigned int _clearfp(void) +{ + ARM_FPSCR fpscr; + unsigned int status; + + fpscr.raw = __getfp(); + status = _statusfp(); + + fpscr.data.exception = fpscr.data.exception & ~ARM_CW_STATUS_MASK; + + __setfp(fpscr.raw); + return status; +} diff --git a/sdk/lib/crt/float/arm/_clearfp.s b/sdk/lib/crt/float/arm/_clearfp.s deleted file mode 100644 index 25275fe1746..00000000000 --- a/sdk/lib/crt/float/arm/_clearfp.s +++ /dev/null @@ -1,24 +0,0 @@ -/* - * COPYRIGHT: BSD - See COPYING.ARM in the top level directory - * PROJECT: ReactOS CRT library - * PURPOSE: Implementation of _clearfp - * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) - */ - -/* INCLUDES ******************************************************************/ - -#include <kxarm.h> - -/* CODE **********************************************************************/ - - TEXTAREA - - LEAF_ENTRY _clearfp - - __assertfail - bx lr - - LEAF_END _clearfp - - END -/* EOF */ diff --git a/sdk/lib/crt/float/arm/_controlfp.c b/sdk/lib/crt/float/arm/_controlfp.c new file mode 100644 index 00000000000..2c697841ea2 --- /dev/null +++ b/sdk/lib/crt/float/arm/_controlfp.c @@ -0,0 +1,83 @@ +/* + * PROJECT: ReactOS CRT library + * LICENSE: MIT (
https://spdx.org/licenses/MIT
) + * PURPOSE: Implementation of _controlfp + * COPYRIGHT: Copyright 2021 Roman Masanin <36927roma(a)gmail.com> + */ + +#include <precomp.h> +#include "fpscr.h" + +unsigned int CDECL _controlfp(unsigned int newval, unsigned int mask) +{ + return _control87(newval, mask & ~_EM_DENORMAL); +} + +unsigned int CDECL _control87(unsigned int newval, unsigned int mask) +{ + ARM_FPSCR fpscr; + unsigned int flags = 0; + + TRACE("(%08x, %08x): Called\n", newval, mask); + + /* Get fp control word */ + fpscr.raw = __getfp(); + + TRACE("Control word before : %08x\n", fpscr.raw); + + /* Convert into mask constants */ + if (!(fpscr.data.ex_control & ARM_CW_IM)) flags |= _EM_INVALID; + if (!(fpscr.data.ex_control & ARM_CW_ZM)) flags |= _EM_ZERODIVIDE; + if (!(fpscr.data.ex_control & ARM_CW_OM)) flags |= _EM_OVERFLOW; + if (!(fpscr.data.ex_control & ARM_CW_UM)) flags |= _EM_UNDERFLOW; + if (!(fpscr.data.ex_control & ARM_CW_PM)) flags |= _EM_INEXACT; + if (!(fpscr.data.ex_control & ARM_CW_DM)) flags |= _EM_DENORMAL; + + switch (fpscr.data.rounding_mode) + { + case ARM_CW_RC_ZERO: flags |= _RC_UP|_RC_DOWN; break; + case ARM_CW_RC_UP: flags |= _RC_UP; break; + case ARM_CW_RC_DOWN: flags |= _RC_DOWN; break; + } + + /* Mask with parameters */ + flags = (flags & ~mask) | (newval & mask); + + /* Convert (masked) value back to fp word */ + fpscr.raw = 0; + if (!(flags & _EM_INVALID)) fpscr.data.ex_control |= ARM_CW_IM; + if (!(flags & _EM_ZERODIVIDE)) fpscr.data.ex_control |= ARM_CW_ZM; + if (!(flags & _EM_OVERFLOW)) fpscr.data.ex_control |= ARM_CW_OM; + if (!(flags & _EM_UNDERFLOW)) fpscr.data.ex_control |= ARM_CW_UM; + if (!(flags & _EM_INEXACT)) fpscr.data.ex_control |= ARM_CW_PM; + if (!(flags & _EM_DENORMAL)) fpscr.data.ex_control |= ARM_CW_DM; + + switch (flags & (_RC_UP | _RC_DOWN)) + { + case _RC_UP|_RC_DOWN: fpscr.data.rounding_mode = ARM_CW_RC_ZERO; break; + case _RC_UP: fpscr.data.rounding_mode = ARM_CW_RC_UP; break; + case _RC_DOWN: fpscr.data.rounding_mode = ARM_CW_RC_DOWN; break; + case _RC_NEAR: fpscr.data.rounding_mode = ARM_CW_RC_NEAREST; break; + } + + TRACE("Control word after : %08x\n", fpscr.raw); + + /* Put fp control word */ + __setfp(fpscr.raw); + + return flags; +} + +int CDECL _controlfp_s(unsigned int *cur, unsigned int newval, unsigned int mask) +{ + unsigned int val; + + if (!MSVCRT_CHECK_PMT( !(newval & mask & ~(_MCW_EM | _MCW_RC | _MCW_DN)) )) + { + if (cur) *cur = _controlfp(0, 0); /* retrieve it anyway */ + return EINVAL; + } + val = _controlfp(newval, mask); + if (cur) *cur = val; + return 0; +} diff --git a/sdk/lib/crt/float/arm/_controlfp.s b/sdk/lib/crt/float/arm/_controlfp.s deleted file mode 100644 index e7cbf13cb6e..00000000000 --- a/sdk/lib/crt/float/arm/_controlfp.s +++ /dev/null @@ -1,24 +0,0 @@ -/* - * COPYRIGHT: BSD - See COPYING.ARM in the top level directory - * PROJECT: ReactOS CRT library - * PURPOSE: Implementation of _controlfp - * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) - */ - -/* INCLUDES ******************************************************************/ - -#include <kxarm.h> - -/* CODE **********************************************************************/ - - TEXTAREA - - LEAF_ENTRY _controlfp - - __assertfail - bx lr - - LEAF_END _controlfp - - END -/* EOF */ diff --git a/sdk/lib/crt/float/arm/_fpreset.c b/sdk/lib/crt/float/arm/_fpreset.c new file mode 100644 index 00000000000..3ddfad1fef6 --- /dev/null +++ b/sdk/lib/crt/float/arm/_fpreset.c @@ -0,0 +1,13 @@ +/* + * PROJECT: ReactOS CRT library + * LICENSE: MIT (
https://spdx.org/licenses/MIT
) + * PURPOSE: Implementation of _fpreset + * COPYRIGHT: Copyright 2021 Roman Masanin <36927roma(a)gmail.com> + */ + +#include "fpscr.h" + +void _fpreset(void) +{ + __setfp(0x0); +} diff --git a/sdk/lib/crt/float/arm/_fpreset.s b/sdk/lib/crt/float/arm/_fpreset.s deleted file mode 100644 index caba746d382..00000000000 --- a/sdk/lib/crt/float/arm/_fpreset.s +++ /dev/null @@ -1,24 +0,0 @@ -/* - * COPYRIGHT: BSD - See COPYING.ARM in the top level directory - * PROJECT: ReactOS CRT library - * PURPOSE: Implementation of _fpreset - * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) - */ - -/* INCLUDES ******************************************************************/ - -#include <kxarm.h> - -/* CODE **********************************************************************/ - - TEXTAREA - - LEAF_ENTRY _fpreset - - __assertfail - bx lr - - LEAF_END _fpreset - - END -/* EOF */ diff --git a/sdk/lib/crt/float/arm/_statusfp.c b/sdk/lib/crt/float/arm/_statusfp.c new file mode 100644 index 00000000000..553b8241370 --- /dev/null +++ b/sdk/lib/crt/float/arm/_statusfp.c @@ -0,0 +1,24 @@ +/* + * PROJECT: ReactOS CRT library + * LICENSE: MIT (
https://spdx.org/licenses/MIT
) + * PURPOSE: Implementation of _statusfp + * COPYRIGHT: Copyright 2021 Roman Masanin <36927roma(a)gmail.com> + */ + +#include "fpscr.h" + +unsigned int _statusfp(void) +{ + unsigned int flags = 0; + ARM_FPSCR fpscr; + + fpscr.raw = __getfp(); + + if (fpscr.data.exception & ARM_CW_IM) flags |= _SW_INVALID; + if (fpscr.data.exception & ARM_CW_ZM) flags |= _SW_ZERODIVIDE; + if (fpscr.data.exception & ARM_CW_OM) flags |= _SW_OVERFLOW; + if (fpscr.data.exception & ARM_CW_UM) flags |= _SW_UNDERFLOW; + if (fpscr.data.exception & ARM_CW_PM) flags |= _SW_INEXACT; + if (fpscr.data.exception & ARM_CW_DM) flags |= _SW_DENORMAL; + return flags; +} diff --git a/sdk/lib/crt/float/arm/_statusfp.s b/sdk/lib/crt/float/arm/_statusfp.s deleted file mode 100644 index 1c810985f3e..00000000000 --- a/sdk/lib/crt/float/arm/_statusfp.s +++ /dev/null @@ -1,24 +0,0 @@ -/* - * COPYRIGHT: BSD - See COPYING.ARM in the top level directory - * PROJECT: ReactOS CRT library - * PURPOSE: Implementation of _statusfp - * PROGRAMMER: Timo Kreuzer (timo.kreuzer(a)reactos.org) - */ - -/* INCLUDES ******************************************************************/ - -#include <kxarm.h> - -/* CODE **********************************************************************/ - - TEXTAREA - - LEAF_ENTRY _statusfp - - __assertfail - bx lr - - LEAF_END _statusfp - - END -/* EOF */ diff --git a/sdk/lib/crt/float/arm/fpscr.h b/sdk/lib/crt/float/arm/fpscr.h new file mode 100644 index 00000000000..a3ddd1d9eed --- /dev/null +++ b/sdk/lib/crt/float/arm/fpscr.h @@ -0,0 +1,41 @@ +/* + * PROJECT: ReactOS CRT library + * LICENSE: MIT (
https://spdx.org/licenses/MIT
) + * PURPOSE: Headers for ARM fpcsr + * COPYRIGHT: Copyright 2021 Roman Masanin <36927roma(a)gmail.com> + */ + +#include <float.h> + +#define ARM_CW_STATUS_MASK 0x9F +#define ARM_CW_IM (1 << 0) /* Invalid operation mask */ +#define ARM_CW_ZM (1 << 1) /* Zero divide mask */ +#define ARM_CW_OM (1 << 2) /* Overflow mask */ +#define ARM_CW_UM (1 << 3) /* Underflow mask */ +#define ARM_CW_PM (1 << 4) /* Precision mask */ +#define ARM_CW_DM (1 << 7) /* Denormal operand mask */ + +#define ARM_CW_RC_NEAREST 0 /* round to nearest */ +#define ARM_CW_RC_UP 1 /* round up */ +#define ARM_CW_RC_DOWN 2 /* round down */ +#define ARM_CW_RC_ZERO 3 /* round toward zero (chop) */ + +typedef union _ARM_FPSCR +{ + unsigned int raw; + struct + { + unsigned int exception: 8; + unsigned int ex_control: 8; + unsigned int len: 3; + unsigned int unused3: 1; + unsigned int stride: 2; + unsigned int rounding_mode: 2; + unsigned int flush_to_zero: 1; + unsigned int unused4: 3; + unsigned int status_flag: 4; + } data; +} ARM_FPSCR; + +void __setfp(unsigned int); +unsigned int __getfp(void); diff --git a/sdk/lib/crt/float/float.cmake b/sdk/lib/crt/float/float.cmake index 5693f11e186..8f16c995a09 100644 --- a/sdk/lib/crt/float/float.cmake +++ b/sdk/lib/crt/float/float.cmake @@ -33,10 +33,14 @@ elseif(ARCH STREQUAL "amd64") float/amd64/logb.S ) elseif(ARCH STREQUAL "arm") + list(APPEND CRT_FLOAT_SOURCE + float/arm/_clearfp.c + float/arm/_controlfp.c + float/arm/_fpreset.c + float/arm/_statusfp.c + ) list(APPEND CRT_FLOAT_ASM_SOURCE - float/arm/_clearfp.s - float/arm/_controlfp.s - float/arm/_fpreset.s - float/arm/_statusfp.s + float/arm/__getfp.s + float/arm/__setfp.s ) endif()
3 years, 3 months
1
0
0
0
[reactos] 01/01: [SETUPLIB] Default to "ReactOS (Debug)" boot entry on debug builds, instead of "ReactOS".
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c188821f8ba522e4e6ddf…
commit c188821f8ba522e4e6ddf9d27dbcc6defeee4fd9 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Tue Sep 7 22:25:34 2021 +0200 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Tue Sep 7 22:25:37 2021 +0200 [SETUPLIB] Default to "ReactOS (Debug)" boot entry on debug builds, instead of "ReactOS". --- base/setup/lib/bootsup.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/base/setup/lib/bootsup.c b/base/setup/lib/bootsup.c index 1d03d07e2d0..58c17e79bed 100644 --- a/base/setup/lib/bootsup.c +++ b/base/setup/lib/bootsup.c @@ -126,21 +126,20 @@ CreateFreeLoaderReactOSEntries( #endif -#if DBG + /* DefaultOS=ReactOS */ +#if DBG && !defined(_WINKD_) if (IsUnattendedSetup) { - /* DefaultOS=ReactOS */ -#ifndef _WINKD_ BootOptions.CurrentBootEntryKey = MAKESTRKEY(L"ReactOS_KdSerial"); -#else - BootOptions.CurrentBootEntryKey = MAKESTRKEY(L"ReactOS_Debug"); -#endif } else #endif { - /* DefaultOS=ReactOS */ +#if DBG + BootOptions.CurrentBootEntryKey = MAKESTRKEY(L"ReactOS_Debug"); +#else BootOptions.CurrentBootEntryKey = MAKESTRKEY(L"ReactOS"); +#endif } #if DBG
3 years, 3 months
1
0
0
0
← Newer
1
...
9
10
11
12
13
14
15
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Results per page:
10
25
50
100
200