1965 Commits

Author SHA1 Message Date
Lioncash
19f21d0be2
travis: Bump macOS deployment version to 10.14
Some of std::variant's functions are only available in 10.14 and later.
2019-05-03 16:36:58 -04:00
Lioncash
41c1aa61df
A32/coprocessor: Remove boost from public interface
Removes a boost header from the public includes in favor of using the
standard-provided std::variant.

The use of boost in public interfaces is often a dealbreaker for some
people. Given we use std::optional in the header already, we can
transition over to std::variant from boost::variant.

With this removal, this makes all of our dependencies internal to the
library itself.
2019-05-03 12:43:57 -04:00
Lioncash
ae4d168c76
a64_emit_x64: Use const on locals where applicable
Normalizes the use of const in the source file.
2019-05-03 12:27:27 -04:00
Lioncash
7ab5b65706
a32_emit_x64: Use const on locals where applicable
Normalizes the use of const in the source file.
2019-05-03 12:15:30 -04:00
Lioncash
2d9a155de2
emit_x64: Use const on locals where applicable 2019-05-03 11:54:44 -04:00
Lioncash
c8860a0742
emit_x64: Remove unnecessary typename in GetBasicBlock()
This can be deduced from the name alone.
2019-05-03 11:51:46 -04:00
Lioncash
3a29baabc0
emit_x64_vector: Use const on locals where applicable
Normalizes the use of const in the source file.
2019-05-02 19:22:49 -04:00
Lioncash
9f86639b46
emit_x64_saturation: Use const on locals where applicable
Normalizes the use of const in the source file.
2019-05-02 19:22:49 -04:00
Lioncash
0b2ba9410e
emit_x64_packed: Use const on locals where applicable
Normalizes the use of const across the source file.
2019-05-02 19:22:49 -04:00
Lioncash
d1bb04b035
emit_x64_data_processing: Use const on locals where applicable
Normalizes the use of const across the source file.
2019-05-02 19:22:49 -04:00
MerryMage
244222bed5 fuzz_thumb: Disable fuzzing longer blocks 2019-05-03 00:17:48 +01:00
Merry
120d264bc9
Merge pull request #493 from lioncash/ir
frontend/ir/ir_emitter: Remove unnecessary logical shift overloads
2019-05-02 23:47:16 +01:00
Merry
9a9906bc1b
Merge pull request #492 from lioncash/vfp
A32: Rename vfp2-related files to vfp
2019-05-02 23:46:53 +01:00
Merry
f2fa3853b7
Merge pull request #491 from lioncash/hint
A32: Allow hooking of hint instructions in ARM mode.
2019-05-02 23:45:59 +01:00
Merry
7fb72ddf93
Merge pull request #490 from lioncash/crc32
A32: Implement ARM-mode CRC32 instructions
2019-05-02 23:45:09 +01:00
Lioncash
ee174e60aa
frontend/ir/ir_emitter: Remove unnecessary logical shift overloads
These aren't necessary anymore, now that the U32U64 overload already
exists.
2019-05-02 18:06:30 -04:00
Lioncash
78a93b0540
A64/translate/impl/impl: Mark locals const where applicable in DecodeBitMasks()
Follows the convention of making immutable state explicit.
2019-05-02 17:46:37 -04:00
MerryMage
71a448c66f block_of_code: Explicitly delete copy constructor 2019-05-02 21:41:49 +01:00
MerryMage
6bf0470e09 Suppress MSVC warning C4702: unreachable code 2019-05-02 21:41:22 +01:00
Lioncash
e5d77334f0
A32: Implement ARM-mode CRC32 instructions
Implements the ARM-mode variants of the CRC32 instructions introduced
within ARMv8. This is also one of the instruction cases where there is
UNPREDICTABLE behavior that is constrained (we must do one of the
options indicated by the reference manual).

In both documented cases of constrained unpredictable behavior, we treat
the instructions as unpredictable in order to allow library users to
hook the unpredictable exception to provide the intended behavior they
desire.
2019-05-02 16:22:10 -04:00
Lioncash
fc0ecdf3b1
travis: Make macOS builder use Xcode 10.2
Keeps it targeting the latest Xcode revision.
2019-05-02 11:40:54 -04:00
Lioncash
16a9e3c4d3
dynarmic_tests: Resolve CPSR discrepancies in tests
Unicorn internally checks if the LSB is set in order to determine
whether or not it should assume thumb mode internally. Clearing this
ourselves will always result in the incorrect PSR between runs.
2019-05-02 11:12:36 -04:00
Lioncash
469b6ad90e
A32: Rename vfp2-related files to vfp
Now that we fuzz against Unicorn, we aren't just restricted to VFPv2.
VFPv3 and VFPv4 facilities can now be implemented. This renames
constructs mentioning VFPv2 to just refer to VFP.
2019-05-02 10:25:43 -04:00
Lioncash
74cf752b2c
frontend/ir/ir_emitter: Amend arguments to conversion opcodes
Accidentally caused within 967d1fcc8d6f60749a162a96b997439450fed687.
That one's on me. My bad.
2019-05-02 10:24:26 -04:00
Lioncash
1634059618
{A32, A64}/types: Use std::array deduction guides where applicable
We also make the arrays static here, as MSVC tends to load the whole
array every time the function is called, instead of storing the data
within rodata.

This also line breaks the elements a little earlier for readability.
2019-05-02 09:28:31 -04:00
Lioncash
13e9d48720
frontend/ir/type: Generify std::array declaration
With deduction guides, we can eliminate the need to explicitly size the
array. Also newlines the elements based off their relation, making it
slightly nicer to read.
2019-05-02 09:08:43 -04:00
Lioncash
994f3cfa33
CMakeLists: Add a namespace to the export
Avoids potentially dumping boost, fmt, and xbyak targets into a
top-level namespace without any qualification, which can lead to build
errors in projects that already make use of them.
2019-05-02 08:39:11 -04:00
Lioncash
362dc5e350
frontend/A32/ir_emitter: Mark locals as const where applicable
Makes const usage consistent within the source file.
2019-05-02 00:07:13 -04:00
Lioncash
9b7a8547b9
frontend/A32/types: Use helper function in operator+ overload
Allows deduplicating an assert and a cast.
2019-05-02 00:03:13 -04:00
Lioncash
28eedda6ff
frontend/A64/types: Make RegNumber() and VecNumber() constexpr
Given they simply perform casting, they can be safely made constexpr.
2019-05-02 00:00:15 -04:00
Lioncash
455a7a0359
frontend/A64/types: Use helper functions in operator+ overloads
Allows us to get rid of another explicit cast.
2019-05-01 23:59:20 -04:00
Lioncash
08cd3f0385
frontend/ir/ir_emitter: Apply const to locals where applicable
Makes const usage consistent with all other functions in the source
file.
2019-05-01 23:54:22 -04:00
Lioncash
967d1fcc8d
frontend/ir/ir_emitter: Use switch constructs in floating point opcodes where applicable
This'll reduce the amount of noise necessary in changes implementing
half-precision instructions, as the type can just be prepended to the
switch cases, instead of rewriting the whole if/else branch.
2019-05-01 23:45:01 -04:00
Lioncash
63c22e9fcb
A32: Allow hooking of hint instructions in ARM mode.
Mirrors the hooking functionality from the AArch64 frontend to make the
behavior of both consistent.
2019-05-01 22:15:49 -04:00
Merry
98c01b0e1a
Merge pull request #489 from lioncash/imm
A32: Replace immediate type aliases with the Imm template
2019-05-01 16:02:44 +01:00
Lioncash
2bd54d6485
A32: Resolve parameter discrepancies discovered via use of the Imm template 2019-04-30 23:58:39 -04:00
Lioncash
17815bdda3
A32: Replace immediate type aliases with the Imm template
Replaces type aliases of raw integral types with the more type-safe Imm
template, like how the AArch64 frontend has been using it.

This makes the two frontends more consistent with one another.
2019-04-28 07:31:00 -04:00
Lioncash
f6a4aaef6e
externals: Update Catch to 2.7.2
Updates Catch from 2.7.0 to 2.7.2. Keeps the unit-testing library up to
date.
2019-04-27 17:36:14 -04:00
Lioncash
f17bf4a352
A32/barrier: Correct PC assignment within ISB
The SetRegister() IR function doesn't allow specifying the PC as a
register. This is a discrepancy that slipped through (my bad). Instead,
we can use BranchWritePC(), like how the other similar PC modifying
locations do it.
2019-04-27 17:22:32 -04:00
Mat M
055fab687d
Merge pull request #488 from lioncash/imm
frontend: Move imm.h to the top-level directory of the frontends
2019-04-27 15:01:12 -04:00
Lioncash
4ed37614c6
frontend: Move imm.h to the top-level directory of the frontends
Preparation to utilize the immediate type within the A32 backend as
well, which will allow eliminating numerous type aliases like Imm4,
Imm5, etc.
2019-04-27 14:53:33 -04:00
Lioncash
6201b0e32d
A32/disassembler_arm: Mark utility functions as static where applicable
These don't depend on class state and can be marked static to make that
explicit.
2019-04-27 09:45:15 -04:00
Mat M
d88e1d027d
Merge pull request #487 from lioncash/fuzz2
a32/fuzz_arm: Use same fuzzing mechanism as AArch64
2019-04-27 09:42:46 -04:00
Merry
19c59bbf26
Merge pull request #486 from lioncash/barrier
A32: Implement barrier instructions introduced in ARMv7
2019-04-27 14:40:06 +01:00
Lioncash
f3679e6278
A32: Implement barrier instructions introduced in ARMv7
Provides basic implementations of the barrier instruction introduced
within ARMv7. Currently these simply mirror the behavior of the AArch64
equivalents.
2019-04-27 08:29:49 -04:00
Lioncash
c32a10ca7e
a32/fuzz_arm: Use same fuzzing mechanism as AArch64
Introduces the same fuzzing mechanism used by the AArch64 code for
fuzzing instruction implementations, getting rid of the need to
manually specify the instruction generator sequences--replacing it with
an instruction blacklist instead.

Much of this change originates from a previous patch made by Mary. This
just makes it interact nicely with the alterations made to get Unicorn
to cooperate properly.
2019-04-27 06:11:55 -04:00
Mat M
b27fe43120
Merge pull request #485 from lioncash/a32
A32: Handle all ARM-mode arithmetic and data processing instructions added in ARMv6T2 and ARMv7
2019-04-26 06:51:24 -04:00
Lioncash
23571f99c5
A32: Implement ARM-mode MLS 2019-04-26 06:50:03 -04:00
Lioncash
adf04f6f9a
A32: Implement ARM-mode MOVT 2019-04-26 06:50:03 -04:00
Lioncash
b4429e7f55
A32: Implement ARM-mode SBFX 2019-04-26 06:50:03 -04:00