Skip to content

Commit

Permalink
Libraries: Update libcInternal (shadps4-emu#2265)
Browse files Browse the repository at this point in the history
* Added all stubs + logging

* Added back memory and math functions from the original code + added some more math functions

* More string functions, snprintf, memmove and setjmp

* Add longjmp + clang

* gmtime, __cxa_atexit and log what functions some games use

* Add Mspace unreachable

* Renaming

* Take out mspace functions to their own file

* Factor out io to a new file

* Empty str and memory files

* Overloaded functions be like:

* str

* memory + math +clang

* clang...

* adjustments :D

* longjmp is questionable

---------

Co-authored-by: georgemoralis <[email protected]>
  • Loading branch information
kalaposfos13 and georgemoralis authored Feb 14, 2025
1 parent 0f8bd50 commit 7db30d1
Show file tree
Hide file tree
Showing 17 changed files with 21,727 additions and 209 deletions.
12 changes: 12 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,18 @@ set(VIDEOOUT_LIB src/core/libraries/videoout/buffer.h

set(LIBC_SOURCES src/core/libraries/libc_internal/libc_internal.cpp
src/core/libraries/libc_internal/libc_internal.h
src/core/libraries/libc_internal/libc_internal_mspace.cpp
src/core/libraries/libc_internal/libc_internal_mspace.h
src/core/libraries/libc_internal/libc_internal_io.cpp
src/core/libraries/libc_internal/libc_internal_io.h
src/core/libraries/libc_internal/libc_internal_memory.cpp
src/core/libraries/libc_internal/libc_internal_memory.h
src/core/libraries/libc_internal/libc_internal_str.cpp
src/core/libraries/libc_internal/libc_internal_str.h
src/core/libraries/libc_internal/libc_internal_stream.cpp
src/core/libraries/libc_internal/libc_internal_stream.h
src/core/libraries/libc_internal/libc_internal_math.cpp
src/core/libraries/libc_internal/libc_internal_math.h
)

set(IME_LIB src/core/libraries/ime/error_dialog.cpp
Expand Down
1 change: 1 addition & 0 deletions src/common/logging/filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ bool ParseFilterRule(Filter& instance, Iterator begin, Iterator end) {
SUB(Kernel, Sce) \
CLS(Lib) \
SUB(Lib, LibC) \
SUB(Lib, LibcInternal) \
SUB(Lib, Kernel) \
SUB(Lib, Pad) \
SUB(Lib, GnmDriver) \
Expand Down
1 change: 1 addition & 0 deletions src/common/logging/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ enum class Class : u8 {
Lib, ///< HLE implementation of system library. Each major library
///< should have its own subclass.
Lib_LibC, ///< The LibC implementation.
Lib_LibcInternal, ///< The LibcInternal implementation.
Lib_Kernel, ///< The LibKernel implementation.
Lib_Pad, ///< The LibScePad implementation.
Lib_GnmDriver, ///< The LibSceGnmDriver implementation.
Expand Down
Loading

0 comments on commit 7db30d1

Please sign in to comment.