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
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
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
6dd6f83c30
[X86Tables] Fixes and implements five instruction's flags
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
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