Stefanos Kornilios Mitsis Poiitidis
9ecdfefdd9
Merge pull request #65 from Sonicadvance1/comiss
...
Implements the COMISS instructions
2020-03-22 08:57:17 +02:00
Ryan Houdek
f89ef01578
Implements the COMISS instructions
...
These are fairly popular so not having them around is causing headaches.
We will really want these in the future to use the host register, btu
that is more time consuming than I want to dedicate to at the moment.
So the FCMP instruction must be told which flags to generate up front,
then it generates the flags in to a GPR which are then tracked and
pulled out with a specific IR op.
This can be augmented in the future to more easily RA the host flag
register
2020-03-21 22:52:46 -07:00
Stefanos Kornilios Mitsis Poiitidis
628a208db2
Merge pull request #61 from Sonicadvance1/ELFLoader_arg_plumbing
...
Plumbs ELFLoader arguments through the CodeLoader
2020-03-22 03:19:16 +02: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
8459f75487
Updates cpp-optparse submodule
2020-03-21 15:18:20 -07:00
Stefanos Kornilios Mitsis Poiitidis
e18fafbf5c
Merge pull request #60 from Sonicadvance1/remove_sarx
...
Removes sarx usage in the x86 JIT
2020-03-21 22:04:55 +02:00
Ryan Houdek
b93848c343
Removes sarx usage in the x86 JIT
2020-03-21 12:44:27 -07:00
Stefanos Kornilios Mitsis Poiitidis
f9b7eff7c6
Merge pull request #58 from Sonicadvance1/instruction_fixes
...
Fixes for SQRTPD, SQRTPS, RSQRTPS
2020-03-21 09:31:00 +02:00
Stefanos Kornilios Mitsis Poiitidis
8a1a3c222b
Merge pull request #57 from Sonicadvance1/fix_futex
...
Fixes a couple bugs in the futex syscall
2020-03-21 09:30:51 +02:00
Stefanos Kornilios Mitsis Poiitidis
24be8b974f
Merge pull request #50 from Sonicadvance1/keep_print
...
Makes sure DCE pass doesn't remove print IR op
2020-03-21 09:27:37 +02:00
Stefanos Kornilios Mitsis Poiitidis
c4cc36d23b
Merge pull request #54 from Sonicadvance1/threaded_compile_workaround
...
Throws a mutex in CompileBlock until we properly handle threaded compilation.
2020-03-21 09:27:06 +02:00
Stefanos Kornilios Mitsis Poiitidis
790faab6a3
Merge pull request #51 from Sonicadvance1/cpuid_hypervisor
...
Adds hypervisor CPUID function
2020-03-21 09:22:32 +02:00
Stefanos Kornilios Mitsis Poiitidis
43df66de29
Merge pull request #52 from Sonicadvance1/remove_old_code
...
Removes old test code from FEXCore
2020-03-21 09:21:51 +02:00
Stefanos Kornilios Mitsis Poiitidis
c6e606c609
Merge pull request #55 from Sonicadvance1/more_syscalls
...
Adds a few new syscalls that I saw in app testing
2020-03-21 09:19:41 +02:00
Stefanos Kornilios Mitsis Poiitidis
f2f6c34309
Merge pull request #56 from Sonicadvance1/fix_automatic_dynamic_linker
...
Fixes the dynamic linker detection
2020-03-21 09:17:55 +02:00
Ryan Houdek
6de60bea70
Fixes FRSQRT in AArch64
...
fmov (vector, immediate, broadcast) keys register size based on the
float/double constant passed in
So since 1.0f was missing the f, it was passed as a double, duplicating
64bit doubles rather than 32bit floats
2020-03-20 19:49:05 -07:00
Ryan Houdek
6899a8f53a
Implements unit tests for sqrtpd, sqrtps, and rsqrtps
2020-03-20 18:14:44 -07:00
Ryan Houdek
76d67812ed
Implements 64bit RSQRT and fixes vector 32bit RSQRT in the x86 JIT.
2020-03-20 18:14:44 -07:00
Ryan Houdek
ba71271982
Implements SQRTPS in OpDispatcher
2020-03-20 18:14:44 -07:00
Ryan Houdek
24159b969c
Fixes RSQRTPS x86 tables
2020-03-20 18:14:39 -07:00
Ryan Houdek
ca36fd4523
Fixes a couple bugs in the futex syscall
...
futex command 9 is actually WAIT_BITSET, not WAKE_BITSET
Implements futexes with timeouts as well, necessary for anything using
std::condition_variable and wait_for/wait_until
2020-03-20 17:32:37 -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
ea167cf7d9
Adds a few new syscalls that I saw in app testing
...
madvise, dup, bind, syslog, getresuid, get_mempolicy, newfstatat, execve
execve specifically returned error. We don't support it yet.
2020-03-20 12:30:08 -07:00
Ryan Houdek
8e06765101
Throws a mutex in CompileBlock until we properly handle threaded compilation.
...
This is purely a workaround until it gets implemented correctly
2020-03-20 12:25:14 -07:00
Ryan Houdek
105d27d0da
Removes old test code from FEXCore
...
These weren't ever actually used and were more of a blasting zone for
testing
2020-03-20 12:11:44 -07:00
Ryan Houdek
a059fc1943
Adds hypervisor CPUID function
...
4000'0000h is the hypervisor CPUID information leaf, can just return all
zeroes to imply we aren't running under a hypervisor
EAX: The maximum input value for CPUID supported by the hypervisor.
- We return zero here to signify no Hypervisor
EBX, ECX, EDX: Vedor ID signature
CPUID 4000'0001h - 4000'000Fh is reserved for hypervisor, which we don't
need to expose since we return zero in EAX
2020-03-20 12:06:01 -07:00
Ryan Houdek
9c24a92f73
Makes sure DCE pass doesn't remove print IR op
...
This is useful for debugging, don't want the DCE pass to remove it
2020-03-20 12:04:23 -07:00
Stefanos Kornilios Mitsis Poiitidis
12c71ad227
Merge pull request #45 from Sonicadvance1/unittests/arm64_ci_ctest
...
Adds ctest step to the CI
2020-03-19 10:22:25 +02:00
Ryan Houdek
a10da81c4d
Adds ctest step to the CI
...
This ensures all unit tests are ran every PR and merge
2020-03-18 13:18:22 -07:00
Ryan Houdek
55a2c3ca99
Merge pull request #41 from Sonicadvance1/fix_llvm9
...
LLVM 9 fixes
2020-03-18 11:05:40 -07:00
Ryan Houdek
fc452de973
Some more fixes for LLVM picked up from the AArch64 side
...
AArch64 is a bit more picky when mixing vector and scalar ops
2020-03-17 19:28:17 -07:00
Ryan Houdek
2e0851975f
Makes sure LLVM on AArch64 can read the cycle counter
2020-03-17 19:28:08 -07:00
Ryan Houdek
d6fb1f2d17
Make sure OpDispatcher is using explicit scalar operations
...
LLVM specifically gets really picky if you mix vector and scalar ops.
Additionally AArch64 seems to be even pickier than x86 for this
2020-03-17 19:27:58 -07:00
Ryan Houdek
94cf11068c
Makes sure Interpreter zeros the upper 64bits when doing Double->Float
2020-03-17 19:27:50 -07:00
Ryan Houdek
aa259c65ef
Merge pull request #42 from Sonicadvance1/unittests/more_desc_names
...
Make unit test names more descriptive about what arguments are passed
2020-03-17 17:01:26 -07:00
Ryan Houdek
90c4b3dae7
Merge pull request #33 from Sonicadvance1/minor_x86_vsqxtun
...
Minor optimization in vsqxtun for x86
2020-03-17 17:01:18 -07:00
Ryan Houdek
c89ed356a3
Make unit test names more descriptive about what arguments are passed
...
Rather than an integer between 0 and 8, just give each argument
configuration a short descriptor.
This makes it easier to parse the error output
2020-03-17 14:40:28 -07:00
Ryan Houdek
388e723c78
Fixes shift ops in LLVM9
...
These don't need to operate at 128bit, just one size larger than
incoming.
This is because of 8bit and 16bit shifts rely on 32bit size masking
rather than 8bit and 32bit, so they have to shift at a larger size due
to ensure correct behaviour(that is not undefined).
LLVM-8 worked with the previous behaviour but broke with LLVM-9.
So changing it to this slightly smarter code gen.
2020-03-17 13:52:23 -07:00
Ryan Houdek
16382c4202
Fixes Scalar FCMP in LLVM9
...
LLVM9 is a bit more strict when mixing scalar and vector ops.
Was causing crashes inside of LLVM when mixing a vector source with a
scalar source
2020-03-17 13:51:07 -07:00
Ryan Houdek
8ea266e10f
Implements the new IR ops in the CPU backends
2020-03-17 13:50:37 -07:00
Ryan Houdek
4692a761b6
Implements two new IR Op codes
...
Extracts a vector element to a scalar value
Inserts a scalar element in to a vector
2020-03-17 13:49:47 -07:00
Stefanos Kornilios Mitsis Poiitidis
734618b588
Merge pull request #38 from Sonicadvance1/unittests/smaller_vmem
...
Make the unit test runner allocate less SHM space
2020-03-17 20:15:05 +02:00
Stefanos Kornilios Mitsis Poiitidis
2993e4dab6
Merge pull request #37 from Sonicadvance1/unittests/bt_reg
...
Unit tests and fixes for BT ops with GPR destination
2020-03-17 19:43:44 +02:00
Stefanos Kornilios Mitsis Poiitidis
a32efcfec0
Merge pull request #39 from Sonicadvance1/llvm_typo
...
Fixes AArch64 LLVM intrinsic typo
2020-03-17 19:42:31 +02:00
Stefanos Kornilios Mitsis Poiitidis
7a70b89547
Merge pull request #40 from Sonicadvance1/fix_old_cmake
...
Moves FEXCore install target to the FEXCore/Source directory
2020-03-17 19:42:10 +02:00
Ryan Houdek
e21bf077ab
Moves FEXCore install target to the FEXCore/Source directory
...
This fixes an issue with older cmake versions where it throws an error
if the install target was declared in a different cmake file
Newer cmake doesn't seem to care
2020-03-17 09:39:04 -07:00
Ryan Houdek
7ba9aef304
Fixes AArch64 LLVM intrinsic typo
...
arch64 != aarch64
2020-03-17 09:35:39 -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
d1154bcb9c
Implements BT op unit tests with GPR destination
2020-03-17 09:28:01 -07:00
Ryan Houdek
469935e5b8
Fixes x86-64 JIT using invalid movzx
...
Found with BT test ops
2020-03-17 09:26:52 -07:00