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
Ryan Houdek
0c2344166c
Merge pull request #1044 from lioncash/moves
...
Config: Move strings where applicable
2021-06-03 18:33:00 -07:00
Lioncash
0bf30e2024
Config: Simplify qualifiers
...
These functions are part of the same class, so we can use the function
names directly without qualifiers.
2021-06-03 21:06:14 -04:00
Lioncash
933cdf76b4
Config: Move strings where applicable
...
Noticed when adding amending missing const qualifiers on interfaces. We
can make use of std::move here to avoid potential allocation churn a
little.
While we're at it, we can implement EraseSet in terms of, well, Erase()
and Set().
2021-06-03 21:03:19 -04:00
Ryan Houdek
36a77bb396
Merge pull request #1043 from lioncash/const
...
General: Add missing const specifiers where applicable
2021-06-03 17:40:13 -07:00
Lioncash
1936ebc59c
General: Add missing const specifiers where applicable
...
Minor change that adds missing const specifiers to getters that don't
modify internal class state.
2021-06-03 20:24:27 -04:00
Ryan Houdek
9838309560
Merge pull request #1042 from lioncash/strong
...
DecodedOperand: Convert operand type into an enum class
2021-06-02 05:01:56 -07:00
Lioncash
37e2210f64
DecodedOperand: Convert operand type into an enum class
...
Now possible in a less messy way, since the type is now centralized in
one location.
Makes it strongly typed and prevents any potential accidental implicit
assignments to Type instead of something intended for the Data members.
2021-06-02 06:51:15 -04:00
Ryan Houdek
71c32c0135
Merge pull request #1041 from lioncash/info
...
DecodedOperand: Add helper functions for type testing
2021-06-02 03:10:49 -07:00
Lioncash
1f0bc49e54
DecodedOperand: Add helper functions for type testing
...
Significantly shortens the amount of code necessary for testing the type
of a decoded operand.
Also relocates the type field out of all the union types to have it in a
central location.
2021-06-02 05:59:12 -04:00
Lioncash
718f7ef8e6
X86InstInfo: Add operator!=
...
Provides logical symmetry.
2021-06-02 05:44:31 -04:00
Ryan Houdek
edd1dfdfe8
Merge pull request #1040 from Sonicadvance1/more_syscalls_5_12
...
Implements more syscalls for supporting a higher guest kernel version
2021-06-01 00:27:50 -07:00
Ryan Houdek
4243ed19a4
Merge pull request #1037 from Sonicadvance1/fexconfig_downgrade
...
FEXConfig: Allow lower GL versions
2021-06-01 00:14:04 -07:00
Scott Mansell
16467c0fb7
Merge pull request #1038 from Sonicadvance1/implement_insertps
...
Implements SSE4.1 insertps
2021-06-01 19:04:53 +12:00
Ryan Houdek
0b7587768d
Unifies 32bit and 64bit clone implementation
...
Syscall entry points still have different argument orders,
Moves the arguments to the clone3 argument structure and passes to generic handler.
Also implements clone3 while doing this
2021-05-27 23:00:00 -07:00