Ryan Houdek
a28df9f5c1
Moves SonicUtils in to FEXCore
...
Removes the extraneous and dead VM CPU backend
2020-11-29 00:30:28 -08:00
Scott Mansell
5b1d4eadd4
IR: Make BFI sizes explicit
...
Otherwise they can be quite hard to get right.
2020-11-26 12:40:37 +13:00
Ryan Houdek
6605c6e6eb
Removes dead TLS setting code
...
This is no longer necessary now that phire fixed mapping of static elfs
2020-11-25 13:18:57 -08:00
Ryan Houdek
830d8146cf
Support unity+mono+bdwgc sigsuspend GC shenanigans
2020-11-20 01:07:54 -08:00
Ryan Houdek
4503f41957
Merge pull request #473 from FEX-Emu/skmp/memops-addressgen
...
Complex address generation for Load/StoreMem
2020-11-19 23:57:20 -08:00
Ryan Houdek
c430f10c86
Implements a threaded compile service routine
...
This is made to be completely synchronous to a thread
2020-11-18 10:07:47 -08:00
Stefanos Kornilios Mitsis Poiitidis
59c9138282
Merge pull request #511 from Sonicadvance1/compile_service_shared_data
...
Adds function for copying data required for threaded compiler
2020-11-18 20:03:27 +02:00
Ryan Houdek
47d47fac86
Adds function for copying data required for threaded compiler
...
These structures need to be shared to the threaded compiler, so set it
up for copying.
Will be necessary for the compile service
2020-11-17 13:48:10 -08:00
Ryan Houdek
1b21bb7699
Allow copying of an IRListView copy
...
This will be useful with the compile service coming up to keep
IRListViews coherent across threads
2020-11-17 12:31:53 -08:00
Stefanos Kornilios Mitsis Poiitidis
f38179913a
IR: Swith MemoryOffsetType to a type from uint8_t
2020-11-17 16:23:50 +02:00
Stefanos Kornilios Mitsis Poiitidis
9fdd2a5b10
LoadMem/StoreMem: Add OffsetType, OffsetScale
2020-11-17 16:23:50 +02:00
Stefanos Kornilios Mitsis Poiitidis
74254a1a9c
IR: Load/Store mem with two args
2020-11-17 16:23:48 +02:00
Ryan Houdek
deaf879e78
Merge pull request #490 from FEX-Emu/skmp/extended-condjump-branching
...
CondJump: Add support for two operands to match Select
2020-11-17 01:19:21 -08:00
Stefanos Kornilios Mitsis Poiitidis
11e12a9b36
Add --unsafe-no-pf
2020-11-17 11:11:13 +02:00
Stefanos Kornilios Mitsis Poiitidis
8fc6f73571
IR: InvalidateFlags + --abi-local-flags
...
- InvalidateFlags pseudo-op is a hint for the Dead Flags Elimination pass that flags are not needed past that point
- Adds a new option, --abi-local-flags, that invalidates the flags on CALLs or RETs. This might break code that doesn't follow the ABI rules.
2020-11-17 11:08:29 +02:00
Stefanos Kornilios Mitsis Poiitidis
908796be1a
Typofix: UnwarpNode -> UnwrapNode
2020-11-17 11:06:01 +02:00
Stefanos Kornilios Mitsis Poiitidis
2dad4718d6
IR: Add DumpIR option, --dump-ir command line
...
This dumps the IR before and after optimizations
--dump-ir can be
"no" -> Do not dump
"stderr" -> Dump to stderr
"stdout" -> Dump to stdout
"some/path" -> Dump to "some/path/$GuestRip-pre.ir" and "some/path/$GuestRip-post.ir"
2020-11-16 16:14:07 +02:00
Stefanos Kornilios Mitsis Poiitidis
709f5cd925
CondJump: Now with cmp/b.cc support
2020-11-06 10:54:52 +02:00
Stefanos Kornilios Mitsis Poiitidis
eafe853c75
CondJump: Switch to two arguments + Cond for flexible branching
2020-11-06 10:54:52 +02:00
Stefanos Kornilios Mitsis Poiitidis
2abfe71c42
Select: Add compare & Data sizes, cset/setcc specializations
...
- CompareSize can be 4 or 8
- DataSize can be 4 or 8
- Support for INLINE_CONSTANTS for `Select cmp1,cmp2,1,0` that specializes to cset / setcc
2020-11-05 19:46:57 +02:00
Ryan Houdek
7f4836b982
Fixes 32bit x87 usage
...
All of the ops that were relying on a 64bit memory offset were being
downgraded to 32bit.
Abuses the XMM_FLAGS option a bit to indicate that it shouldn't
downgrade the 64bit size flag. Which isn't an issue since all these
operations can't encode a register since modrm_r is used for table
decoding
2020-10-25 11:17:00 -07:00
Stefanos Kornilios Mitsis Poiitidis
93e372c7a4
IR/JITs: Inline Constants Implementation
...
Based on @phire's idea, Inline constants are constants that can be used as imms in instructions.
This
- Adds OP_INLINECONSTANT to represent them in the IR
- Modifies the ConstProp pass to transform OP_CONSTANT to OP_INLINECONSTANT based on per-platform heuristics
- Modifies the backends to use imms
- Supported opcodes: Add, Sub, Lsl, Lsr, Asr, Ror, Rol
2020-10-22 18:49:17 +03:00
Ryan Houdek
dd49a04809
Fixes RIP literal sign extending on 32bit
...
RIP Literal isn't actually RIP literal on 32bit, it is RIP absolute.
64bit treats the 32bit as a signed offset, while 32bit treats it as a
32bit unsigned offset
2020-10-17 20:19:50 -07:00
Ryan Houdek
a8175ca891
Moves away from std::is_pod
...
This is deprecated in C++20 and will spam warnings all over the place
2020-10-17 16:02:55 -07:00
Ryan Houdek
02d029877c
Adds segment register flags mask
2020-10-09 23:33:07 -07:00
Ryan Houdek
83ac23be21
Implements new VTBL1 IR op
...
This perfectly matches the AArch64 variant and almost perfectly matches
x86's pshufb instruction
2020-09-26 12:59:34 -07:00
Ryan Houdek
ddd7b8f406
Adds a mixxing VXor op to the IREmitter helper
2020-09-26 12:52:26 -07:00
Stefanos Kornilios Mitsis Poiitidis
83db01f505
Merge pull request #429 from Sonicadvance1/psign
...
Implements support for SSSE3 PSIGN{B,W,D}
2020-09-26 20:20:06 +03:00
Ryan Houdek
b68832f31b
Adds the IR ops to the IREmitter helper
2020-09-24 19:45:17 -07:00
Ryan Houdek
09ee71b8c3
Adds missing VFSub IREmitter function
2020-09-23 18:07:53 -07:00
Ryan Houdek
de2a165a7d
Adds ability for the frontend to register a signal handler
...
This will come to be useful for our host code execution and wine in the
future
2020-09-22 13:19:41 -07:00
Scott Mansell
b0cfc19267
Fast replacement path for constants
2020-09-17 11:29:57 +12:00
Ryan Houdek
d424cf0eee
Merge pull request #365 from phire/IR_iterators
...
Refactor the IR Interface to prevent "foot-shooting"
2020-09-16 11:24:44 -07:00
Stefanos Kornilios Mitsis Poiitidis
df3bdf361f
SMC: Add --smc-full-checks, implement frontend, irint, irjit, unit test
2020-09-16 01:15:21 +03:00
Ryan Houdek
e9b74b0230
Initial Callback support
...
This interface is for native host code to be able to call back in to JIT
to execute guest code.
This is mainly for thunks but could be used for other purposes.
This can cross a couple ABI boundaries so one must be careful when
calling in to this
2020-09-11 15:48:51 -07:00
Scott Mansell
d515753b38
Remove remaing traces of NodeWrapperIterator
2020-09-11 21:50:30 +12:00
Scott Mansell
e756b46189
Allow AllNodes to iterate in reverse
...
We replace Dummy with the old unused BeginBlock
and pointing it at block header like EndBlock
2020-09-11 21:50:30 +12:00
Scott Mansell
3c6dbd0ade
Change iterator type of IR.at
...
And switch over more passes to use the new interfaces.
2020-09-11 21:50:30 +12:00
Scott Mansell
df6618a4d2
New replace node functions
...
Probally doesn't build
2020-09-11 21:48:03 +12:00
Scott Mansell
4ad4f28a75
Add Code and All Code iterators
2020-09-11 21:48:03 +12:00
Scott Mansell
599231c180
IRListView: Add GetOp<T>
2020-09-11 21:48:03 +12:00
Scott Mansell
36afd5b1c6
Block Iterator: Use structured bindings
2020-09-11 21:48:03 +12:00
Scott Mansell
446b261f24
Iterator for blocks
2020-09-11 21:48:03 +12:00
Ryan Houdek
4b17521ab9
Merge pull request #343 from Sonicadvance1/cpuid_improvements
...
Has /proc/cpuinfo generated from CPUID
2020-09-06 12:40:03 -07:00
Ryan Houdek
e177bb3ebc
Adds a git_version generated header
...
Allows us to get the short git hash at runtime
2020-09-05 16:59:10 -07:00
Ryan Houdek
0819a40c57
Adds option to disable TSO
...
This is a knowingly wrong option for anything running in a threaded
environment
2020-09-05 16:58:03 -07:00
Ryan Houdek
50349db4c6
Moves our entire execution model over to signal execution
...
This requires implementing custom ASM dispatchers for the interpreter
side of things so it works correctly.
Allows all of our CPU backends to safely support signaling.
This is a bit of a nightmare change and requires rethinking logic about
debugging in some instances.
2020-09-02 16:00:17 -07:00
Scott Mansell
3989772a4f
Remove OP_Zext
...
Zext has confusing sematics and does excatly the same thing as BFE
* Repace with other ops (mostly BFE)
* Allow specifying BFE size
2020-08-26 00:47:01 +12:00
Ryan Houdek
5efab55ea9
Removes LLVM from FEX
...
LLVM has too many problems with it to use it as a tiered level of JIT.
We won't be able to use it
2020-08-19 18:02:28 -07:00
Ryan Houdek
b38983df35
Implements new TSO loadstore IR ops.
...
These need to end up being specially handled on non-x86 platforms
2020-08-12 15:24:00 -07:00