Stefanos Kornilios Misis Poiitidis
a6a816fb38
CMake: C/C++ flags for defined singed overflow warping
2022-05-10 17:14:17 +03:00
Stefanos Kornilios Mitsis Poiitidis
b9d878b1f4
Merge pull request #1672 from FEX-Emu/skmp/add-guest-mmap-munmap
...
Syscalls/Linux: Add guest[Mmap/Munmap]
2022-05-09 12:55:40 +03:00
Parallels
45a9a83c79
Loaders: Use bind_front instead of lambdas to bind GuestM(un)map
2022-05-09 12:39:48 +03:00
Parallels
560cfc757c
HarnessHelper: Allocations need to be MAP_FIXED
2022-05-09 11:57:19 +03:00
Stefanos Kornilios Misis Poiitidis
e92f51e415
Syscalls/Linux: Add GuestMmap & GuestMunmap, update code to use it
2022-05-09 11:57:08 +03:00
Ryan Houdek
6e9e5b3bd6
Config: Adds code object cache config option
...
This will be used soon
2022-05-06 10:26:44 -07:00
Ryan Houdek
d1ac406895
EmulatedFiles: Fixes temporary file flags
...
mode and flags were being combined incorrectly.
2022-05-05 21:50:34 -07:00
Stefanos Kornilios Misis Poiitidis
efb42c1ad1
Syscalls/Linux: Refactor guest mman tracking
2022-05-03 15:26:32 +03:00
Stefanos Kornilios Mitsis Poiitidis
d8109880f4
Merge pull request #1670 from FEX-Emu/skmp/processwide-code-invalidations
...
Core: context-wide guest code invalidations
2022-05-03 15:23:10 +03:00
Stefanos Kornilios Misis Poiitidis
b5a4e5920d
Core: Rename FlushCodeRange to InvalidateGuestCodeRange
2022-05-02 01:49:54 +03:00
Stefanos Kornilios Misis Poiitidis
94d2ed85a7
Core: Add support for process-wide code invalidation, rename IR invalidate op to do thread specific invalidation
2022-05-02 01:49:49 +03:00
Stefanos Kornilios Misis Poiitidis
df78f5d50e
FEXLoader: Fix create_directories check for aotir .path file writting
2022-05-02 01:25:02 +03:00
Stefanos Kornilios Misis Poiitidis
a888da436b
Linux/MemAllocator32Bit: Add missing lock to shmdt, fix error returns
2022-05-02 01:00:53 +03:00
Ryan Houdek
753d0ede6c
FEXCore: Reclaimable thread pool allocator
...
Creates a pool allocator for OpcodeDispatcher and IRCompaction that
shares memory allocations between threads in a pool and supports
reclaiming stale allocations from participating threads.
A thread will use a heuristic to keep its claimed memory allocation
around if it is allocating a lot of code. If it slows down then it will
start putting the memory allocation back in to the thread pool.
Additionally if the allocation has been "disowned" and gone to sleep
while still retaining the allocation, then another thread can inspect
these stale allocations and reclaim it from the idling thread. Saving
further memory.
This needs some more work and cleanup but this is an interesting concept
that saves a decent amount of memory even in a basic test.
Causes teeworlds' title screen to go from 754MB to 599MB in my simple
test. 79.4% the memory usage is a good start.
2022-04-26 10:01:56 -07:00
Ryan Houdek
f6a74a710d
FEXBash: Set PS1 to make it more obvious when running under FEX
...
This requires us to pass in --no-rc to bash since otherwise PS1 gets
overwritten by shell variables and nothing happens.
Which this is fine for the common use case of just wanting to run a
basic bash script under emulation.
2022-04-25 11:59:04 -07:00
Ryan Houdek
72e82d0304
Linux: Fixes 32-bit mmap
...
This went unnoticed for so long since most applications are new enough
to use mmap2 instead of mmap.
This was just completely broken.
Fixes #1630
2022-04-24 10:56:56 -07:00
Ryan Houdek
128a24d699
Linux: Updates supported guest Linux version to v5.17
2022-04-23 11:59:18 -07:00
Ryan Houdek
cd94a8f0ac
Linux: Adds support for new v5.17 virtio IOCTL
2022-04-23 11:58:56 -07:00
Ryan Houdek
df5e0e5df9
Linux: Adds support for new v5.17 syscall
2022-04-23 11:58:38 -07:00
Ryan Houdek
458bbf4ef7
Linux: Updates syscalls for v5.17
2022-04-23 11:57:37 -07:00
Ryan Houdek
42a6320935
Merge pull request #1585 from CallumDev/x87f64
...
Emulate reduced-precision X87 with 64-bit host FPU ops
2022-04-21 09:22:03 -07:00
CallumDev
3f89e46d66
Add X87ReducedPrecision to FEXConfig
2022-04-22 01:36:56 +09:30
Stefanos Kornilios Misis Poiitidis
e87e9d269a
TestHarnessRunner: Flush log on asserts
2022-03-21 21:32:35 +02:00
Ryan Houdek
68f32d85c9
CodeLoader: Expose base ELF loaded offset
...
Useful for gdb
2022-03-09 19:07:45 -08:00
Ryan Houdek
2aa77e85de
LinuxSyscalls: Expose CodeLoader through syscall interface
2022-03-09 19:07:45 -08:00
Ryan Houdek
91665fdf0e
Merge pull request #1610 from wannacu/main
...
FileManager: Fix realpath failed on debian buster
2022-03-09 18:58:52 -08:00
wannacu
898873e9e3
FileManager: Fix realpath failed on debian buster
...
This happend on debian buster when run realpath(i386) on arm64 host.
2022-03-08 16:42:05 +08:00
Ryan Houdek
52292e5f7e
Linux: Fixes MAP_32BIT supported range
...
I accidentally committed a 32-bit range that was significantly smaller
than what it should be.
While the minimal range worked for simple cases, it didn't work for
anything complex.
Give it the full range it needs.
Fixes #1600
2022-03-06 17:46:17 -08:00
Mai M
f5f9512d9a
Merge pull request #1606 from Sonicadvance1/fhu_page_size
...
Change page define usages over to self-defined
2022-03-06 15:53:15 -05:00
Ryan Houdek
99a93fa9ea
Disables GUI applications in a Termux build
2022-03-06 08:09:55 -08:00
Ryan Houdek
4cb6918506
Change page define usages over to self-defined
...
In the case of an AArch64 builder is using 16kb or 64kb pages like is
common on servers then it would fail to compile, even if the resulting
application would only ever run on 4k page hosts.
Resolve this by removing the build check and hardcoding 4kb pages for
each of our uses. We still require 4kb pages to run, so this mostly just
removes the weirdness where it is 16kb builder + 4k runner. Would have
broken some of our assumptions when running.
2022-03-06 07:33:10 -08:00
Ryan Houdek
847b6e5026
LinuxSyscalls: Fixes struct verifier on Ubuntu 20.04
...
The `linux/types.h` header needs to be included before the rest
otherwise we are missing types.
2022-03-04 17:44:26 -08:00
Mai M
08938ecb11
Merge pull request #1596 from Sonicadvance1/fix_old_kernel_bug
...
LinuxAllocator: Fixes bug with old kernels and hint allocation
2022-03-02 00:26:51 -05:00
Ryan Houdek
5137af5bae
Fixes epoxy include in FEXConfig and FEXLogServer
2022-03-01 03:55:19 -08:00
Ryan Houdek
3418cc8054
LinuxSyscalls: More type fixes
2022-03-01 03:55:15 -08:00
Ryan Houdek
1f835ea1f4
LinuxSyscalls: Fixes semid and ipc types
...
Newer headers redefine semid_ds and ipc_perm as semid64_ds and
ipc64_perm silently.
Use the new types directly since we are a 64-bit only application.
2022-03-01 03:55:12 -08:00
Ryan Houdek
0a40753624
More missing include fixes
2022-03-01 03:55:10 -08:00
Ryan Houdek
09010e1292
LinuxSyscalls: Remove unused headers now
...
These don't even exist on termux.
2022-03-01 03:54:01 -08:00
Ryan Houdek
bddf3871ba
LinuxSyscalls/x32/Types: Fixes stat type definitions
...
The time argument definitions are defines in termux.
Rename our definition name of these so we don't get caught by define.
2022-03-01 03:50:18 -08:00
Ryan Houdek
1ca9e56502
LinuxSyscalls/x64/Types: Fix guest_stat definition
...
kernel types don't exist in termux. Use uint64_t and int64_t directly.
Also using reserved `__` causes compile failure.
2022-03-01 03:50:17 -08:00
Ryan Houdek
fe58a9ae2c
LinuxSyscalls/Thread: Don't use set_robust_list on Termux
...
Would get caught by seccomp and crash FEX
2022-03-01 03:50:15 -08:00
Ryan Houdek
bc7c4dfa74
LinuxSyscalls/x32/Types: Don't redefine SIGEV defines
2022-03-01 03:50:12 -08:00
Ryan Houdek
7af7b1309d
Msg: Switch msqd_t to FEX defined type
2022-03-01 03:50:10 -08:00
Ryan Houdek
dd4630750f
LinuxSyscalls/Types: Adds missing types for Termux
2022-03-01 03:50:07 -08:00
Ryan Houdek
302da029eb
Work around Termux not supporting hardlinks
...
The Android filesystem they are on just doesn't support them
Instead of hardlinking FEXLoader to FEXInterpter, just build the
executable twice and eat the filesystem cost.
2022-03-01 03:50:05 -08:00
Ryan Houdek
3cc59bc68e
LinuxSyscalls: Switches to a bunch of raw syscalls
...
For older and Termux build environments these helper libc functions
don't exist.
2022-03-01 03:49:31 -08:00
Ryan Houdek
30c27851ef
FEXRootFSFetcher: Termux build environments
2022-03-01 03:30:47 -08:00
Ryan Houdek
9b29ff61e9
Adds some missing headers
2022-03-01 03:30:45 -08:00
Ryan Houdek
91f780223b
Stop self-defining PAGE_SIZE
...
We only work on targets with 4096 byte page sizes.
Adds a cmake compile test to ensure this is adhered to.
2022-03-01 03:30:43 -08:00
Ryan Houdek
a0efd2b01f
Resolve comments.
2022-02-28 21:04:03 -08:00