Ryan Houdek
7a43b3150b
Fixes bug in frontend displacement calculation
...
When an instruction had a literal and also a SIB displacement then this
was causing it to be calculated incorrectly.
2020-03-06 07:55:21 +02:00
Ryan Houdek
a8bb815a76
Adds IR::ADD to constprop pass.
2020-03-06 07:55:21 +02:00
Ryan Houdek
218f38ff3d
Adds new IR::GetArgs
function
...
This returns SSA args that will eventually be register allocated.
2020-03-06 07:55:20 +02:00
Ryan Houdek
58e019fbf1
Disabled AVX512 reporting in CPUID
...
We don't support it and it'll be something we won't want to support for
a long time.
2020-03-06 07:55:20 +02:00
Ryan Houdek
1b751f11dc
Fixes a bug in BitSet
...
If the number of nodes in a bitset grew too large then it wouldn't fit
in that calculation.
2020-03-06 07:55:19 +02:00
Ryan Houdek
6d92146578
Flesh out X86Tables some more
...
Adds an EVEX table and throws some ops in to an unimplemented function.
This is necessary for multiblock in the future where it will see
unsupported instructions but not actually execute them.
2020-03-06 07:55:18 +02:00
Scott Mansell
d32ebc0de0
Signal our lack of support for CET shadow stacks
...
Needed to support binaries linked with glibc 2.30 and later.
glibc doesn't actually check CPUID, as kernel support is needed.
Instead, it just calls ARCH_CET_STATUS and checks for an error.
2020-03-06 07:55:18 +02:00
Ryan Houdek
13a15d6f3e
Fix RA pass to support spilling
2020-03-06 07:55:17 +02:00
Ryan Houdek
3f0d020899
Add support for an Invalid NodeWrapperIterator
2020-03-06 07:55:17 +02:00
Ryan Houdek
db5467211c
Fixes the AArch64 JIT
...
Moves it to the new IR iterating style.
Forgot to clear icache after generation.
Fixes overly aggressive struct packing causing a fault
2020-03-06 07:55:16 +02:00
Ryan Houdek
c21f711417
Adds a JitSymbols interface
...
This allows linux perf to see execution inside of JIT functions.
This could be extended in the future to support something like vtune or
oprofile.
2020-03-06 07:55:16 +02:00
Ryan Houdek
d645e58721
Remove some debug logs
2020-03-06 07:55:15 +02:00
Ryan Houdek
1dbeff462c
Fixes Redundant Context Load Elimination pass
...
Allows other passes to see more things it can optimize
`ReplaceAllUsesWith` is a bit of a trap and needs to be replaced.
2020-03-06 07:55:14 +02:00
Ryan Houdek
4ccdd689ce
Fixes a bug in the CBW/CWDE/CDQE instruction
...
Was running at the wrong size the entire time
2020-03-06 07:55:14 +02:00
Ryan Houdek
199cfd76d8
Refactor IR and other changes that are hard to split
...
I had to change how blocks are represented to make it easier to parse
This required a fairly substantial refactor that makes it so blocks are
represented differently and we can walk them sequentially.
This will make future analysis easier to deal with.
Had to rewrite the passes and core's parsing of the IR afterwards.
Moved RA in to a optimization pass to be shared between the JIT backends
This works because x86-64 and AArch64 RA can be identical.
Still doesn't support PHI nodes or spilling correctly, this is the first
step in the process of getting there.
2020-03-06 07:55:13 +02:00
Ryan Houdek
6ac9f93d0d
Update vixl submodule
2020-03-06 07:54:33 +02:00
Ryan Houdek
2975161e89
Cleanup the Frontend x86 decoder
...
Makes it easier to follow the source
2020-03-06 07:54:32 +02:00
Ryan Houdek
71a9713970
Add some stracing to the syscall emulation
2020-03-06 07:54:32 +02:00
Ryan Houdek
55b4eb8689
Defined a few more Linux syscalls
2020-03-06 07:54:32 +02:00
Ryan Houdek
c2e8c8d430
Minor cleanup in BlockCache
2020-03-06 07:54:31 +02:00
Ryan Houdek
47d91e05f0
Add ioctl to filemanagement
2020-03-06 07:54:31 +02:00
Ryan Houdek
e59a6fcd5d
Add cmake message about which JIT we are using
2020-03-06 07:54:30 +02:00
Ryan Houdek
0e35fddac6
Fixed shadowed variable warning
2020-03-06 07:54:29 +02:00
Ryan Houdek
185f6c78a9
Cleans up X86Tables and removes a bunch of templates and lambdas
...
Drops compile time dramatically
2020-03-06 07:52:38 +02:00
Ryan Houdek
e78ad71f4f
Fixes IR definition file getting rebuilt every time ninja is ran
...
Speeds up rebuild time significantly
2020-03-06 07:52:37 +02:00
Ryan Houdek
6dd6f83c30
[X86Tables] Fixes and implements five instruction's flags
2020-03-06 07:52:36 +02:00
Ryan Houdek
925ce8b35e
[CPUBackend] Add custom dispatch virtual functions to be implemented
2020-03-06 07:52:36 +02:00
Ryan Houdek
0d20ec0f2c
[MemoryMapper] Adds debug only GetPointer with size check.
2020-03-06 07:52:35 +02:00
Ryan Houdek
92d4aaf2e2
Partial FXSave/FXRStor instruction implementations.
2020-03-06 07:52:35 +02:00
Ryan Houdek
3e4743512d
Stub FXSave and FXRStor instructions. Necessary for launching dynamic apps from ld.so
2020-03-06 07:52:34 +02:00
Ryan Houdek
febd707634
Removes some debug logging in the file manager and stops explicitly avoiding the ld.so.cache
2020-03-06 07:52:33 +02:00
Ryan Houdek
46f983fbb6
Minor fix to SHL op to not update flags if the shift amount was zero.
2020-03-06 07:52:32 +02:00
Ryan Houdek
f503bd573f
Fix CBW/CWDE/CDQE instruction storage
2020-03-06 07:52:28 +02:00
Ryan Houdek
ab63fdc6d5
Adds some missing flags on the SETcc ops
2020-03-06 07:51:55 +02:00
Ryan Houdek
c65f148fa8
Update git submodules to point to the correct vixl repo
2020-03-06 07:51:42 +02:00
Ryan Houdek
065e72141a
Reenable optimization passes
...
Keep validation pass disabled for now
2020-03-06 07:51:08 +02:00
Ryan Houdek
f7834cb32c
Let the IRCompaction pass DCE dead ops
2020-03-06 07:50:24 +02:00
Ryan Houdek
8c8be231d8
Cleanup some ugly usage of OrderedNode's NodeOffset
...
ID() gives us the clean ID, no need to calculate it manually
2020-03-06 07:50:15 +02:00
Ryan Houdek
40cad15da9
Cleanup old IR emitter functions
...
Argumentless IR emitter functions were prone to generating invalid code.
Remove them from the python emitter and change the branch instructions
that were using them to a new version instead.
Adds NumUse tracking as well.
2020-03-06 07:48:41 +02:00
Ryan Houdek
7252050e42
Initial commit
2020-03-06 07:48:39 +02:00
Stefanos Kornilios Mitsis Poiitidis
a468d10d56
SonicUtils: Move to External/SonicUtils
2020-03-06 07:24:46 +02:00
Ryan Houdek
2e8fda02dd
Downgrade some asserts to debug messages instead
2020-03-03 02:24:58 -08:00
Ryan Houdek
33daca99e2
Adjust the project to be able to be installed
...
Cleans up file locations
2019-11-14 23:10:13 -08:00
Ryan Houdek
43ec043478
Fixes PML4 calculation to not be completely broken
2019-11-05 06:02:38 -08:00
Ryan Houdek
1d5e79744d
Adds a bunch of changes for ELF shared library support
...
Isn't complete but it is getting there
2019-10-09 17:28:35 -07:00
Ryan Houdek
5efe93fac9
Some changes
2019-09-07 19:23:03 -07:00
Ryan Houdek
d68f54542d
Disable LogManager's assert function when in a release build
2019-07-07 22:18:46 -07:00
Ryan Houdek
f078b299a0
Improve VM utility code
2019-07-07 22:18:26 -07:00
Ryan Houdek
6a2f79fa2c
Remove printf that was left in
2019-05-30 05:04:47 -07:00
Ryan Houdek
63f375d410
Add an Event helper class
2019-05-30 05:01:44 -07:00