David Miller
e9003acf36
Ensure TestHarnessRunner doesn't enable UnifiedMemory.
2020-04-25 12:56:37 -04:00
David Miller
0c51baf7a8
Added default Config::UnifiedMemory value to true
2020-04-25 12:49:41 -04:00
David Miller
1589b9a351
Added EnvLoader to frontend binaries, called prior to ArgLoader
2020-04-24 19:53:28 -04:00
David Miller
75ee8f0604
EnvironmentLoader, clean merge
2020-04-24 19:25:57 -04:00
David Miller
5999e7477f
Added guard around llvm/IR/IntrinsicsX86.h inclusion, seems to only be needed for version 10?\nMore Investigation needed here.\nChanged Debugger/IMGui.{h,cpp} to IMGui_I so it will build in filesystems that aren't case sensitive.\nAdded CMakeSettings.json that has profiles to build from VisualStudio, using env variables to control system specific options. \n Currently only the WSL is tested (and working). \nRemote should work as well, if correct string for preconfigured remote is in env variable fexremote.\nCross compile (to linux) untested, using sysroot in env variable fexsysroot
2020-04-23 16:12:28 -04:00
Ryan Houdek
780278a7f6
Fixes memory allocation
...
4GB virtual memory is too small and causes things to fault.
Previously we were at `1 << 36` but it caused oom issues on devices with
smaller amounts of memory.
This time ensure the the SHM memory is allocated with MEM_NORESERVE so
devices can actually allocate the virtual memory region.
2020-04-12 18:39:00 -07:00
Ryan Houdek
3424326987
Removes accurate-std command line argument
...
This is an option that has been removed
2020-04-09 18:01:29 -07:00
Ryan Houdek
5298379fb9
Ensure the ELFLoader doesn't end up in the lower 32bit address space
...
We need to reserve that space for EXEC apps and 32bit apps. Hard throw a
warning if any of our mapping space ends up in the lower 32bits.
PIE and potentially a custom dynamic linker can enforce this.
2020-04-08 13:35:29 -07:00
Ryan Houdek
15d5ba6fc1
Adds RootFS search path in ELFLoader
...
Fixes #69 , makes it less annoying to run things on non x86 hosts
2020-04-04 23:17:40 -07:00
Ryan Houdek
3fd1475d30
Plumbs ELFLoader arguments through the CodeLoader
...
This is necessary for execve in the future to keep everything in sync
2020-03-21 15:19:31 -07:00
Ryan Houdek
e5dc72ad69
Fixes the dynamic linker detection
...
Fixes #49
Makes it so we no longer have to pass in the ld location to the
ELFLoader application.
Once we switch over to the dynamic linker, the program being executed to
us is no longer a dynamic program.
But the frontend ELF loader also still needs to know that we are
executing the dynamic linker so it can append the linker to the
arguments.
2020-03-20 13:08:33 -07:00
Ryan Houdek
4ea18647ed
Make the unit test runner allocate less SHM space
...
It doesn't need 64GB of virtual memory, so knock it down to its minimum
virtual memory required
2020-03-17 09:34:20 -07:00
Ryan Houdek
a2afd684ae
Allows ELF loader to pull in all environment variables
...
This will leak some host state which is fine.
Necessary to allow access to things like DISPLAY and XAUTHORITY and
various other bits
2020-03-06 09:08:50 +02:00
Ryan Houdek
b75647f9a8
Be better behaved with the Test harness helper results
2020-03-06 09:08:50 +02:00
Ryan Houdek
03f068ec1d
Adds support for unified memory option in ELFLoader application
2020-03-06 09:08:50 +02:00
Ryan Houdek
d698feae53
Update ELFLoader CodeLoader to support unified memory and auxp values
...
auxp is required for most applications
2020-03-06 09:08:50 +02:00
Ryan Houdek
c32d7b84bc
Make environment variable setting less vocal
2020-03-06 09:08:47 +02:00
Scott Mansell
d4cffa5354
Add x87/MMX registers to test harness
2020-03-06 09:08:47 +02:00
Ryan Houdek
3a460b4bf0
Support setting the library rootfs in the ELFLoader
2020-03-06 09:08:46 +02:00
Ryan Houdek
13d681558e
Adds accurate STD output option to ELFLoader
2020-03-06 09:08:44 +02:00
Scott Mansell
149ab3f6f7
TestHarnessRunner: Abuse CompareStates to verify
...
Bit of a hack, but it gets verification against the expected values.
2020-03-06 09:08:35 +02:00
Scott Mansell
213b739f12
Add GdbServer intergraton
2020-03-06 09:08:34 +02:00
Scott Mansell
81b9810f36
FEXCore: Refactor context start/pause/step interface
2020-03-06 09:08:28 +02:00
Ryan Houdek
c0b3a94e4f
Fixes up stack space for argv and envp
...
These were messy and we were previously losing a page for random
"redzone" which doesn't matter.
We only needed 16bytes more for some additional padding that was needed
for something
2020-03-06 09:08:25 +02:00
Scott Mansell
3300587e6a
Fix ENV pointers overwriting args
2020-03-06 09:08:25 +02:00
Ryan Houdek
99dc73441c
Update project externals
2020-03-06 09:08:23 +02:00
Ryan Houdek
369686c992
Initial Commit
2020-03-06 09:08:13 +02:00
Stefanos Kornilios Mitsis Poiitidis
e9ea4cbb76
FEXCore: Move to Externals/FEXCore
2020-03-06 09:07:37 +02:00
Ryan Houdek
f034cef9fc
Fixes FindTrailingZeros IR interpreter
...
Was generating undefined behaviour when input was zero
Found via unit tests when testing TZCNT with zero input
2020-03-06 07:56:19 +02:00
Ryan Houdek
157f66bfc0
Fixes MOVSS op bug found by unit tests
...
It had failed to zext to 128bits when loading from memory
2020-03-06 07:56:19 +02:00
Ryan Houdek
9c363fb317
Various fixes that unit tests have found
...
- Need to distinguish between unsigned and signed saturating ops
- Fixes vector splat
- Fixes VUMULL/VSMULL num element calculation
- Fixes undefined behaviour in a couple of vector shift ops
- Implements VSSHR
- Fixes VExtr calculating offset correctly
- Fixes VInsGPR calculating offset correctly
- Fixes PSRA (not immediate) x86 ops
- Fixes scalar vector unary ops to correctly insert lower bits
- Fixes conversion instructions correctly inserting lower bits
- Fixes PINSRW using the wrong element size
2020-03-06 07:56:19 +02:00
Ryan Houdek
9b21caa647
Adds support for CMPPD's NEQ comparison
2020-03-06 07:56:19 +02:00
Ryan Houdek
1a7eddb49d
Fixes a bug in MOVLPD
2020-03-06 07:56:19 +02:00
Ryan Houdek
d2a1c41563
Fixes the missed BTC op instruction from the previous BT* changes
2020-03-06 07:56:19 +02:00
Ryan Houdek
cd5e34e8cc
Fixes a bunch of various bugs in the x86 translation
...
Removes a bunch of MMX instructions accidently exposed in the
opdispatcher tables.
2020-03-06 07:56:19 +02:00
Ryan Houdek
c721810516
Adds some new IR ops to the interpreter
2020-03-06 07:56:18 +02:00
Ryan Houdek
20d04b0216
Fixes some undefined behaviour with shifts in the interpreter
2020-03-06 07:56:18 +02:00
Ryan Houdek
0d870147ec
Removes syscall's FD remapper
...
Required because we can't track all FD remapping
2020-03-06 07:56:18 +02:00
Ryan Houdek
b0df2e4f18
Fixes missing MOVMSKOp class function definition
2020-03-06 07:56:18 +02:00
Ryan Houdek
ba6c542a56
Adds support for MOVMSKPS/MOVMSKPD
2020-03-06 07:56:18 +02:00
Ryan Houdek
c5dac3eff7
Fixes CMPSD x86table flag for size calculation
2020-03-06 07:56:18 +02:00
Ryan Houdek
7909b1f277
Adds UNPCKHPS instruction
2020-03-06 07:56:18 +02:00
Ryan Houdek
e67f141c29
Adds packed float comparison x86 instructions CMPPS/CMPPD
2020-03-06 07:56:18 +02:00
Ryan Houdek
9870547d50
Fixes 32bit element selection for SHUFP
2020-03-06 07:56:18 +02:00
Ryan Houdek
cde683eff4
Adds support for ancillary data in sendmsg
2020-03-06 07:56:18 +02:00
Ryan Houdek
f645bd7901
Adds a few new IR ops
...
Fixes REP CMPS. It needs to also break when ZF == 0
Fixes REPNE SCAS. It shouldn't set ZF to 0 on entry. Could result in erroneous flag setting.
Implements a few new x86 ops
2020-03-06 07:56:18 +02:00
Ryan Houdek
75f7bc0abd
Fixes FindMSB op for the interpreter for 8bit/16bit types
...
Was zexting to 32bit and thing doing a findMSB which was wrong
2020-03-06 07:56:17 +02:00
Ryan Houdek
ec5f3a6854
Fixes LEA instruction
...
LEA changes behaviour based on the ordering of the prefixes on the
instruction
eg:
66 48 8d 3d ffffffff: lea rdi, [rip - 1]
48 66 8d 3d ffffffff: lea di, [rip - 1]
So we need to know the order of a few of the prefixes.
In the future this should probably be switched to a three deep stack to
have the ordering but for now this'll do
2020-03-06 07:56:17 +02:00
Ryan Houdek
64e863a5a0
Adds a few more instructions to the OpcodeDispatcher
2020-03-06 07:56:17 +02:00
Ryan Houdek
e854112927
Implements Unified memory in the x86 JIT
2020-03-06 07:56:17 +02:00