Stefanos Kornilios Mitsis Poiitidis
c6e09ddec5
Merge pull request #1046 from Sonicadvance1/more_sse41
...
Implements SSE4.1
2021-06-08 16:52:12 +03:00
Ryan Houdek
f699726409
Merge pull request #1060 from lioncash/byte
...
Utils: Add header for bit-related utilities
2021-06-08 05:40:05 -07:00
Lioncash
a2b8fedba5
Utils: Add header for bit-related utilities
...
Places a layer of separation around the remaining compiler builtins.
2021-06-08 08:25:32 -04:00
Ryan Houdek
ed2336c4f2
Disables some new sse4.1 gcc tests
...
The SSE 4.1 path of these tests seemingly work, it's the setup code before the
test that is broken.
We will need to find out why these are failing later
2021-06-08 02:44:40 -07:00
Ryan Houdek
748c3182a7
Fixes a typo in interpreter LSHL
...
This was causing uint32_t pointers to sign extend on 32-bit
New tests being run were hitting this when we were expecting them to zero extend
2021-06-08 02:44:40 -07:00
Ryan Houdek
dfc454873c
Moves AOTIR cache queue object to be inside the context
...
This fixes a crash that occurs due to mixing memory allocators.
This PR has tickled the allocation just enough that it broke
2021-06-08 02:44:40 -07:00
Ryan Houdek
1b06a06a4e
Makes RoundType a unique type
...
This allows us to have the IRDumper have unique output for the type
2021-06-08 02:44:40 -07:00
Ryan Houdek
b2ad8d73ac
Adds unit test for FEX frontend decoder
...
This could potentially show up as being ch instead of edi.
Ensure we don't regress behaviour in the future
2021-06-08 02:44:39 -07:00
Ryan Houdek
fec078f924
Fixes bug in interpreter VInsGPR
...
If the source GPR had data that was larger than the element it would overwrite other elements
Mask it correctly. This then matches behaviour with the other CPU backends
2021-06-08 02:44:39 -07:00
Ryan Houdek
38f1cded2c
Implements unit tests for all the SSE4.1 instructions
2021-06-08 02:44:39 -07:00
Ryan Houdek
a313253510
Enables SSE 4.1 in CPUID
2021-06-08 02:44:39 -07:00
Ryan Houdek
7b2b2a3d07
Implements all the remaining SSE4.1 instructions
...
Theres a fair number of these so I won't describe them all.
A couple highlights are MPSADBW and PHMINPOSUW.
These don't really match with AArch64 very well so their IR is a bit ugly.
2021-06-08 02:44:39 -07:00
Ryan Houdek
910a25b0ed
Cleans up some vector ops that don't need dedicated functions
...
All of these ops can use the VectorALUOp and VectorUnaryOp templated functions
2021-06-08 02:44:39 -07:00
Ryan Houdek
75bae81331
Describe the remaining SSE4.1 ops in the tables
2021-06-08 02:44:39 -07:00
Ryan Houdek
02abbd216a
Fixes an issue with debug printing vectors
...
We need to save the vector registers otherwise we will corrupt them.
Also in the case of printing a vector register, fall down the specialized path
Only useful when debugging
2021-06-08 02:44:39 -07:00
Ryan Houdek
8b7a7e91c9
Implements new IR ops
...
Adds VBic, VUMinV, VPopcount, VUnZip, VUnZip2, VDupElement, Vector_FToI, and VUABDL
We will need these for the SSE4.1 ops
2021-06-08 02:44:39 -07:00
Ryan Houdek
130f82a310
Merge pull request #1058 from lioncash/builtins
...
General: Place more compiler specifics into CompilerDefs.h
2021-06-07 05:31:07 -07:00
Lioncash
18e0f2636f
General: Make use of the <bit> header where applicable
...
Since C++20, a bunch of bit manipulation functions finally have a common
interface, so lets make use of those
2021-06-07 08:16:51 -04:00
Lioncash
2b9029623e
General: Abstract trapping behind a define
...
Provides a layer of separation from direct usages of compiler builtins.
2021-06-07 06:18:44 -04:00
Lioncash
6798afe91f
General: Abstract unreachable behind a define
...
Provides a layer of separation from direct use of compiler built-ins.
2021-06-07 06:13:26 -04:00
Ryan Houdek
4fa8522d9e
Merge pull request #1057 from lioncash/cprop
...
ConstProp: Separate out constituent chunks of const prop
2021-06-05 14:08:40 -07:00
Lioncash
58272ffc47
ConstProp: Separate out constituent chunks of const prop
...
Makes it nicer to find where each part of the pass is, and also see how
the pass is operating at a high level.
2021-06-05 16:52:03 -04:00
Ryan Houdek
4c275ecc08
Merge pull request #1056 from lioncash/compiler-defs
...
Utils: Add CompilerDefs.h for compiler-specifics
2021-06-05 12:57:51 -07:00
Ryan Houdek
294ec80aaf
Merge pull request #1055 from lioncash/enum-cls
...
InternalThreadState: Make SignalEvent an enum class
2021-06-05 12:55:10 -07:00
Ryan Houdek
e78d3d1a80
Merge pull request #1054 from lioncash/fmt-1
...
GdbServer: Migrate logging/string handling to fmt where applicable
2021-06-05 12:54:11 -07:00
Lioncash
262389f4ea
ConstProp: Mark internal functions as static
...
Allows them to have internal linkage.
2021-06-05 15:25:35 -04:00
Lioncash
341b811642
Utils: Add CompilerDefs.h for compiler-specifics
...
Puts a layer of separation around compiler specifics (and also makes
them nicer to write).
2021-06-05 13:55:54 -04:00
Lioncash
32744d074e
InternalThreadState: Make SignalEvent an enum class
...
Makes the enumeration strongly typed, preventing implicit conversions,
minimizing the potential chances of an invalid value being used by
accident.
2021-06-05 10:52:56 -04:00
Lioncash
5f91bbe28d
GdbServer: Migrate code to fmt
...
Simplifies a bunch of string manipulation code.
Much nicer to grok than stream formatting in many cases.
2021-06-05 10:34:59 -04:00
Ryan Houdek
69035348f5
Merge pull request #1053 from lioncash/alias
...
CodeLoader: Add type aliases for mapper and unmapper functions
2021-06-05 06:16:27 -07:00
Lioncash
be46db10e4
CodeLoader: Add virtual destructor
...
Ensures that no matter the context the hierarchy tree is used
polymorphically, that the deallocation will always be well-defined.
Gets rid of a potential bug vector.
2021-06-05 08:54:09 -04:00
Lioncash
aa2c18d8cc
CodeLoader: Add type aliases for mapper and unmapper functions
...
Centralizes the long types in one place for less reading.
2021-06-05 08:51:40 -04:00
Ryan Houdek
0a7f0a3441
Merge pull request #1052 from lioncash/fmtimpl
...
LogManager: Add fmt-capable logging functions
2021-06-05 05:46:56 -07:00
Lioncash
ca2b04b309
LogManager: Add fmt-capable logging functions
...
Addresses #146 a little more by providing an interface to perform
fmt-compatible logging.
No more, will people on the project be tormented by classic printf
features like:
- Accidentally passing in a non-trivial type
- PRI macros
- Not being able to add support for custom types
- Mixing up signed/unsigned printf formatting specifiers accidentally
fmt-capable versions of the logging functions are named the same as the
existing functions, just with a "Fmt" or _FMT suffix (depending on
whether or not it's a function being used or a macro, respectively).
2021-06-05 08:29:48 -04:00
Ryan Houdek
376892793f
Merge pull request #1051 from lioncash/view
...
IRParser: Convert array of std::string over to array of std::string_view
2021-06-05 04:05:28 -07:00
Stefanos Kornilios Mitsis Poiitidis
61f73cf0bf
Merge pull request #1050 from Sonicadvance1/fix_semctl_shmctl
...
Fixes semctl and msgctl
2021-06-05 13:54:30 +03:00
Stefanos Kornilios Mitsis Poiitidis
9716a4f0cf
Merge pull request #1049 from Sonicadvance1/drm_headers
...
Adds drm headers to an external repository
2021-06-05 13:53:16 +03:00
Lioncash
35f3777797
IRParser: Make use of insert_or_assign where applicable
...
Avoids some minor potential default constructions that get overwritten
immediately.
2021-06-05 06:43:17 -04:00
Lioncash
d73b79470e
IRParser: Mark parameter of CheckPrintError as a const reference
...
Def is only ever accessed to read members, so we can signify to the
reader to not expect it to be modified.
2021-06-05 06:43:16 -04:00
Lioncash
676d9cb665
IRParser: std::move elements where advantageous
...
e.g. LineDefinitions are moderately beefy, they contain
two strings and a vector of strings among other things,
so we can move instances into their containing vector to avoid some
allocation churn.
2021-06-05 06:43:13 -04:00
Lioncash
993b4513d9
IRParser: Convert array of std::string over to array of std::string_view
...
Same behavior, but allows the arrays to be constexpr (and use less
space; 16 bytes vs 32 bytes per element).
2021-06-05 06:16:42 -04:00
Ryan Houdek
2958744777
Fixes semctl and msgctl
...
There were some problems in both of these implementations.
Fixes #744
Fixes #745
2021-06-04 23:40:24 -07:00
Ryan Houdek
2e8aacffe6
Fixes compat_ptr to return reference instead of copy
...
The expectation was that a reference would be returned rather than a copy.
Oops
2021-06-04 23:39:13 -07:00
Ryan Houdek
2101914c9d
Adds drm headers to an external repository
...
It's highly likely that the host system won't have these headers installed.
Carry them in an external repository to ensure they are available.
Fixes #1047
2021-06-04 21:26:45 -07:00
Ryan Houdek
97c4ba018b
Merge pull request #1048 from lioncash/lookup
...
Config: Avoid a few minor string copies where trivially possible
2021-06-04 17:13:10 -07:00
Lioncash
525d50f07e
config: Pass strings by const reference where applicable
...
In a few cases, the strings aren't ever directly modified, so they can
be passed by reference to eliminate a few trivial copies.
2021-06-04 12:46:34 -04:00
Lioncash
5cec8ddca0
config: Move input strings in Loader constructors
...
Eliminates a copy, minor, but basically a "free" change.
2021-06-04 12:40:38 -04:00
Lioncash
39b2be15ab
config: Make use of heterogenous map lookup
...
Same behavior, but allows lookups without constructing a std::string
(in most cases find() inputs use const char*, so this gets rid of some
string churn).
2021-06-04 12:36:54 -04:00
Ryan Houdek
83bf79ab42
Merge pull request #1045 from lioncash/default
...
IR: Make use of defaulted operator==
2021-06-03 22:01:58 -07:00
Lioncash
1f97a2baa9
IR: Make use of defaulted operator==
...
Same behavior, but allows both operator== and operator!= to be
automatically generated with a single declaration.
2021-06-04 00:52:25 -04:00