268 Commits

Author SHA1 Message Date
MerryMage
244222bed5 fuzz_thumb: Disable fuzzing longer blocks 2019-05-03 00:17:48 +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
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
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
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
Lioncash
42964964ce
A32: Implement ARM-mode UBFX 2019-04-26 06:50:03 -04:00
Lioncash
745dfd5046
A32: Implement ARM-mode BFI 2019-04-26 06:50:02 -04:00
Lioncash
20e499d8d6
A32: Implement ARM-mode BFC 2019-04-26 06:50:02 -04:00
Lioncash
3b7b50b0c0
A32: Implement ARM-mode RBIT 2019-04-26 06:49:56 -04:00
Lioncash
c62b822937
A32: Implement ARM-mode SDIV/UDIV
Now that we have Unicorn in place, we can freely implement instructions
introduced in newer versions of the ARM architecture.
2019-04-21 21:30:29 -04:00
Lioncash
79af6c118c
a32_unicorn: Silence PC value assertions
Ensure the PC is properly masked off after a run.
2019-04-20 06:02:29 -04:00
Lioncash
0d3764569d
fuzz_arm: Tidy up existing tests
Now that we utilize C++17, we can use std::array's deduction guides to
avoid the need to explicitly specify the template arguments.

While we're at it, also use const where applicable.
2019-04-20 05:00:15 -04:00
Lioncash
bce91ff07b
dynarmic_tests: Remove skyeye interpreter
This is quite a messy interpreter and would require a large amount of
work to bring it up to speed to begin implementing newer portions of the
AArch32 instruction set into Dynarmic.

Given we already have fuzzing with Unicorn set up for
AArch64/AArch32, we can get rid of this and unify our testing
infrastructure.

This will also make building the tests much faster, given a whole
interpreter doesn't need to be built anymore as part of the project.
2019-04-20 04:19:22 -04:00
Lioncash
ad7d439ef5
A32: Fuzz instructions using unicorn
While skyeye was OK previously, now that we have an AArch64 backend,
this also means that we eventually have to support the AArch32
counterpart to it. Unfortunately, SkyEye is only compatible up to
ARMv6K, so we woud need to do a lot of work to bring the interpreter up
to speed with things to even begin testing new instruction
implementations.

For the AArch64 side of things, we already use Unicorn, so we can toss
out SkyEye in favor of it instead.
2019-04-20 04:17:18 -04:00
Lioncash
5c11851f33
tests/a32/testenv: Make A32TestEnv's code_mem member a std::vector
Makes the data member consistent with the A64 test environment.
2019-03-02 16:26:37 -05:00
Lioncash
c63dfa7409
tests/unicorn_emu: Add getters and setters for PC/SP
Makes the interface consistent with the A64Unicorn class.
2019-02-28 23:12:13 -05:00
Lioncash
7593eadc2e
tests/A32/fuzz_arm: Remove unused Unix-specific include
This was introduced within 6f6f60c61b2137780102c75841441f760d3cc3fc,
however, the relevant code that it was used with has since been removed,
making the include unnecessary.
2019-02-05 20:59:24 -05:00
Merry
58bc4bcd3c
Merge pull request #422 from lioncash/truncate
a32_unicorn: Silence a truncation warning within UnmappedMemoryHook()
2019-02-02 22:59:41 +00:00
Lioncash
6e54c8f8c8
tests/.../vfp_helper: Amend use of the comma operator
Makes the lines of code slightly nicer to read
2019-01-22 19:06:11 -05:00
Lioncash
91e82bb615
a32_unicorn: Silence a truncation warning within UnmappedMemoryHook()
MemoryRead8() takes a u32, but we were passing the result of a

u32 + size_t operation, which is 64-bit on 64-bit platforms. This
results in a truncation warning
2019-01-22 19:05:42 -05:00
Merry
607b2f98ee
Merge pull request #417 from lioncash/swap
common: Move byte swapping functions to bit_utils.h
2018-11-24 12:44:41 +00:00
Merry
230dcdab4b
Merge pull request #416 from lioncash/space
dynarmic_tests: Remove inconsistent spacing
2018-11-24 12:44:19 +00:00
Lioncash
75b8308cef
common: Move byte swapping functions to bit_utils.h
These are quite general functions, so they can just be moved into common
instead of recreating a namespace here.
2018-11-23 22:50:41 -05:00
Lioncash
4e4e1d315c
dynarmic_tests: Remove inconsistent spacing
Makes the changed code more consistent with the surrounding code.
2018-11-23 21:49:57 -05:00
Lioncash
d7af990350
fuzz_util: Simplify result return in InstructionGenerator's Generate() function
This can just be a simple direct return without a separated declaration
and assignment.
2018-11-23 19:55:32 -05:00
V.Kalyuzhny
05a2dbfce0 Switch boost::optional to std::optional 2018-10-24 15:02:39 +00:00
MerryMage
59dc33ef12 emit_x64_vector: Changes to VectorSignedSaturatedDoublingMultiply
* Return both the upper and lower parts of the multiply if required
* SSE2 does not support the pmuldq instruction, do sign correction to an unsigned result instead
* Improve port utilisation where possible (punpck instructions were a bottleneck)
2018-09-15 09:55:25 +01:00
MerryMage
39818f98e8 emit_x64_floating_point: Hardware FMA implementation of FPRSqrtStepFused 2018-09-12 16:10:18 +01:00
MerryMage
1931d44495 simd_two_register_misc: FNEG (vector) with Q == 0 had dirty upper 2018-09-09 19:55:37 +01:00
Lioncash
02357939ac ir/value: Replace includes with forward declarations
enum classes are still considered complete types when forward declared
(as the compiler knows the exact size of the type from the declaration
alone). The only difference in this case being that the members of the
enum class aren't visible. Given we don't use the members within this
header in any way, we can simply forward declare them here and remove
the inclusions.
2018-09-09 09:04:22 +01:00
MerryMage
959446573f A64: Implement FastDispatchHint 2018-09-07 22:07:44 +01:00
MerryMage
2be95f2b3b A32: Implement FastDispatchHint 2018-09-07 22:07:44 +01:00
MerryMage
42c0589881 A32: Add define_unpredictable_behaviour option 2018-08-26 00:48:27 +01:00
MerryMage
72ed55f143 a32_emit_x64: Fix incorrect BMI2 implementation for SetCpsr
* The MSB for each byte in cpsr_ge were not being appropriately set.
* We also expand test coverage to test this case.
* We fix the disassembly of the MSR (imm) and MSR (reg) instructions as well.
2018-08-23 14:48:23 +01:00
MerryMage
720efe337e emit_x64_floating_point: Fix smallest normal check in EmitFPMulAdd 2018-08-18 13:49:19 +01:00
MerryMage
821cabac1b fp/info: Incorrect point_position in FPValue 2018-08-16 10:50:28 +01:00
MerryMage
6d236d459f system: Implement MRS CNTFRQ_EL0 2018-08-16 09:58:34 +01:00
MerryMage
6cbb6fb190 A32/testenv: Add missing headers 2018-08-15 13:48:50 +01:00
MerryMage
55190bd792 fuzz_with_unicorn: Split utility functions into fuzz_util 2018-08-11 20:51:30 +01:00
MerryMage
2d929cc3b3 tests: Refactor unicorn_emu to allow for A32 unicorn 2018-08-11 18:18:29 +01:00
MerryMage
67ba5d0072 fuzz_with_unicorn: Remove FCVT_float from ignore list 2018-08-03 08:18:40 +01:00
MerryMage
79e6440ea0 fuzz_with_unicorn: Randomize SP 2018-08-01 15:30:59 +01:00
MerryMage
33c80e3181 fuzz_with_unicorn: Randomize PC 2018-08-01 15:30:59 +01:00
MerryMage
8d41024661 testenv: Make code_mem mobile 2018-08-01 15:30:59 +01:00
MerryMage
a19fa0e294 fuzz_with_unicorn: Randomize FPCR.AHP and FPCR.FZ16 2018-07-31 21:27:24 +01:00
MerryMage
07622eedf0 emit_x64_vector_floating_point: Correct FMA in FTZ mode
x64 rounds before flushing to zero
AArch64 rounds after flushing to zero

This difference of behaviour is noticable if something would round to a smallest normalized number
2018-07-31 18:12:39 +01:00
MerryMage
f626ff82d0 backend_x64: Fix FPVectorMulAdd and FPMulAdd NaN handling with denormals
Denormals should be treated as zero in NaN handler
2018-07-31 16:07:46 +01:00