Repository navigation
Conversation
adriadam10
left a comment
There was a problem hiding this comment.
Thanks for the PR. Two things before this can go in:
absoverlaps with #1097, which is still open and adds the sameabs_nid_postfix(int)wrapper plus the sameGuestMath.cppchecks. Please dropabs(theYe20uNnlglAexport change,abs_nid_postfixandCheckAbsoluteValue) from this PR, keep__powidf2, and list #1097 under "Depends on" only if you still need it for the test list; otherwise just leave it out.- The branch conflicts with
mainincore/libs/tests/GuestMath.cpp. Please rebase (no merge commits) after the change above.
The __powidf2 part looks fine on reading (square-and-multiply, INT_MIN handled via unsigned magnitude, reciprocal for negative exponents). Once rebased, please also run ctest -R guest_math and put the result under "Tested" (it's currently listed as not run); CI will need to be green too.
27b517a to
aa7f1f4
Compare
|
Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes. |
|
Tested on Linux (CachyOS x86_64, Intel RPL-S iGPU / Mesa 26.3.0-devel / Vulkan 1.4.363, GCC 16.2.1) at
LGTM! |
|
Reopened. Conflict in |
|
Additional platform validation of standalone PR head Windows: passed — Windows 11, WinLibs GCC 15.2.0 UCRT/POSIX/SEH r7; CMake 4.3.1 / Ninja; Release, 1 checks, 0 failures, 0 CTest skips. Built the selected targets and dependencies; this is focused validation, not a full build or full-suite run. Checks: Command after building: No title/gameplay validation. These results cover the standalone head, not a merge with current main. |
aa7f1f4 to
aafe117
Compare
|
I've rebased the PR onto the latest This PR implements Testing and validation: referring to the earlier checks made by Mouhand-Kaddo
Regarding Cyberpunk 2077: I haven't been able to run the game against this build, so I can't independently confirm whether it calls Could someone with a working build verify the updated branch and check whether Cyberpunk 2077 reaches or calls Thanks! |
adriadam10
left a comment
There was a problem hiding this comment.
Thanks for the rebase. The current head doesn't link when merged onto main (a11c8f7); the rebase resurrected old stubs:
core/libs/prx/libc/Export.cppre-addsvsnprintf_s_nid_postfix,vsscanf_s_nid_postfix,_Mtx_destroy_nid_postfix,_Cnd_destroy_nid_postfixand_Iswctype_nid_postfix.mainalready implements them (src/Formatting.cpp,src/Threads.cpp,src/RuneLocale.cpp), solibc.prxfails withmultiple definition of ...for all five.- It also re-adds the
Ye20uNnlglA/libcCyberUnknown02stub.absis already implemented onmain(src/Math.cpp:78, with tests inGuestMath.cpp), so the stub must not come back. docs/dev/TechnicalDebt.md:346adds avsnprintf_s, vsscanf_sline that is false onmain(they are implemented). The_ZSt14_Atomic_assertline is fine, but note the code comment above that function is only moved, not needed; keepmain's comment as is or move it, but not both.
Fix: start again from current upstream/main and keep only the __powidf2 change: the Math.cpp function, the H+8UBOwfScI export retyped to (double, int) -> double in Export.cpp, and the CheckIntegerPower test. git diff upstream/main --stat should then show those three files only. The __powidf2 algorithm and the tests look right; I'll run guest_math and the negative check once it builds.
As @oneandonlydean asked: please also post the line where Cyberpunk 2077 stops on main without this change, and the output of ctest -R guest_math from a full build.
|
Closing: |
What
Implements the Cyberpunk 2077 libc import that called
NotImplemented_nid_no_patch:H+8UBOwfScI(__powidf2): new__powidf2_nid_postfix(double, int)incore/libs/prx/libc/src/Math.cppusing exponentiation by squaring per the GCC libgcc algorithm (unsigned magnitude soINT_MINis safe, reciprocal for negative exponents);libcCyberUnknown08retyped to(double, int) -> doubleand forwards to it.Ye20uNnlglA(abs) is intentionally left as theNotImplementedstub here; it is covered by still-open #1097, which adds the sameabs_nid_postfix(int)wrapper plus the sameGuestMath.cppchecks.NID hashes and
APS5_EXPORTnames are unchanged. AddsCheckIntegerPowerregression tests tocore/libs/tests/GuestMath.cpp(exact powers,0^0/0^+/-n, negative bases/exponents, near-normal-range bases,INT_MINexponents).Tested
upstream/main(c6e3aa76, no merge commits);git diff --check: clean;mergeable: MERGEABLE.python tools/check_conventions.py --base upstream/main: pass.python tools/nid_names.py --nid H+8UBOwfScI:already-implemented __powidf2;--nid Ye20uNnlglA:rename-ready abs(still a stub, left for feat(libc): implement abs #1097).g++ -std=c++20 -fsyntax-onlyonMath.cpp,Export.cpp,GuestMath.cpp: pass (MSYS2 MinGW GCC 16.2.0).Math.cppobject: all 18CheckIntegerPowerassertions pass, plus a 117-case sweep against__builtin_powiwith 0 mismatches (bit-exact).ctest -R guest_math(no Ninja/supported toolchain and submodules uninitialized in this environment); CI needs to be green.Checklist
main;absleft to feat(libc): implement abs #1097, no other open PR implements__powidf2NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)