MerryMage
fc6b73bd85
a64_emit_x64: Ensure host has updated ticks in EmitA64GetCNTPCT
...
Discovered by @Subv.
Fixes incomplete fix begun in 5a91c94dca47c9702dee20fbd5ae1f4c07eef9df.
That fix fails to take into account that LinkBlock doesn't update ticks until there
are no remaining ticks to be executed.
Test added to confirm fix.
2018-07-22 16:16:26 +01:00
MerryMage
888c6783a1
a64_emit_x64: Fix stack misalignment on Windows for 128-bit exclusive writes
...
Discovered by @Subv.
Includes a test to ensure this codepath is exercised on Windows.
2018-07-22 15:26:25 +01:00
Lioncash
62e86d7287
fp: Use forward declarations where applicable
...
Minimizes the amount of files that need to be rebuilt if the headers
ever change.
2018-07-22 07:04:47 +01:00
Lioncash
cae96d1da5
tests: Silence warnings in skyeye code
...
Gets rid of warning noise when compiling the tests.
2018-07-17 19:44:10 +01:00
MerryMage
5ae55914e2
tests: Add FABD test
2018-07-16 16:55:26 +01:00
MerryMage
5e16785b3a
fp/op: Implement FPToFixed
2018-07-15 15:37:29 +01:00
MerryMage
b5658dc310
mantissa_util: Implement ResidualErrorOnRightShift
...
Accurately calculate residual error that is shifted out
2018-07-15 15:37:29 +01:00
MerryMage
4425da9684
tests/fp: Add FPRound tests
2018-07-15 15:37:28 +01:00
MerryMage
50ec57e372
mp: Implement metaprogramming library
2018-07-15 15:37:28 +01:00
MerryMage
64f4d14b39
fp: Implement FPUnpack
2018-07-15 14:32:06 +01:00
MerryMage
9dd908de1d
fuzz_with_unicorn: Avoid self-modifying code
...
* Don't immediately terminate when unicorn raises an interrupt
* Detect self-modifying code
2018-07-15 12:07:52 +01:00
MerryMage
b81a9a52e1
fuzz_with_unicorn: Configure as per qemu max configuration
2018-07-14 08:51:08 +01:00
Lioncash
751bc31b60
tests/A32/testenv: Add type aliases for register arrays
...
Allows avoiding duplicating std::array instance sizes and types.
2018-07-14 08:22:18 +01:00
Lioncash
badc29f2ea
tests/unicorn: Add type aliases to the Unicorn class
...
Centralizes all register and vector array definitions to a single set of
aliases, so if these are ever changed, then the rest of the testing code
will follow suit without the need to manually change them.
2018-07-14 08:22:18 +01:00
MerryMage
22cd3bac86
tests/A64: Randomize FPCR.RMode for single random instruction
2018-07-14 07:11:32 +01:00
Lioncash
1bfac4aed0
inst_gen: Compress loop into std::any_of in IsInvalidInstruction()
...
Same behavior, but using a more self-documenting function.
2018-07-13 18:28:38 +01:00
Lioncash
a665470545
fuzz_with_unicorn: Move std::vector outside loop in small random block test case
...
Avoids constructing and destructing the vector repeatedly, we can just
alter the contents of the vector on each iteration instead. Also move
out the std::array instances as well, like with the floating-point test
case and the single random instruction test case.
We can also use the regular form of std::generate and avoid hardcoding
size values twice.
2018-07-13 14:48:09 +01:00
MerryMage
537df2e0b8
fuzz_with_unicorn: Temporarily disable FDIV
2018-07-12 22:34:58 +01:00
MerryMage
28786e6ee2
tests/A64: Test small blocks
2018-07-12 22:34:58 +01:00
MerryMage
fc5870d592
fuzz_with_unicorn: Randomize FPCR.RMode
2018-07-12 13:52:29 +01:00
MerryMage
86cd8c9a69
tests: Add print_info program
...
Eases debugging by printing out dynarmic IR for a given A64 instruction, along with
information about what instruction dynarmic thinks it is.
Also prints an LLVM disassembly of the instruction.
2018-06-27 21:23:14 +01:00
MerryMage
f05cb06244
IR: Implement FPMulAdd
2018-06-08 15:23:35 +01:00
Lioncash
7dc6b5abb3
fuzz_with_unicorn: Make float_numbers in floating-point tests constexpr
...
Given this is just a lookup table, this can be made immutable.
2018-06-02 16:47:13 +01:00
Lioncash
be453b0e1c
fuzz_with_unicorn: Remove exclusion of FMOV (imm) for FP-16 floats
...
Qemu, or rather, Unicorn now supports FP-16, since I backported support
for the recent changes to mainline Qemu relating to FP-16 support.
2018-05-19 12:25:43 +01:00
Lioncash
f5fe2af89c
fuzz_with_unicorn: Silence unused variable warning
...
Currently, structured bindings don't provide a way to ignore unused variables.
2018-05-07 16:39:42 +01:00
Lioncash
21790dcf98
CMake: Make FindUnicorn introduce a unicorn target
...
Makes the find module do all the work of properly setting up the target instead of needing to do it in the main CMakeLists file.
2018-04-18 23:59:54 +01:00
Lioncash
1336e1a4ec
unicorn: Be explicit about casting away const to const-incorrect APIs
...
Uses C++ casts which silence relevant warnings in Xcode 9.3
Also migrates relevant Read function equivalents over for consistency.
2018-04-15 08:54:36 +01:00
MerryMage
f0ba929fc3
fuzz_with_unicorn: Correct GenRandomInst
...
UnallocatedEncoding is now handled in ShouldTestInst
2018-04-04 11:15:56 +01:00
MerryMage
da9a4f8877
A64: Partially implement FCVTZU (scalar, fixed-point) and FCVTZS (scalar, fixed-point)
2018-02-20 18:45:28 +00:00
MerryMage
31e370cdf4
A64: Implement system register CNTPCT_EL0
2018-02-20 16:56:05 +00:00
MerryMage
7cef39bdb4
fuzz_with_unicorn: QEMU's implementation of FCVT is incorrect
2018-02-18 13:47:41 +00:00
MerryMage
30b596df19
fuzz_with_unicorn: Explicitly test floating point instructions
2018-02-18 13:18:22 +00:00
MerryMage
4aefed05d5
fuzz_with_unicorn: Print AArch64 disassembly
2018-02-18 13:18:22 +00:00
MerryMage
9527d52c49
Exclusive fixups
...
* Incorrect size of exclusive_address
* Disable tests on exclusive memory instructions for now
2018-02-13 15:47:52 +00:00
MerryMage
d7323d6799
fuzz_with_unicorn: Speed up tests by not initializing/tearing down constantly
2018-02-12 21:48:29 +00:00
MerryMage
adc2d5a3cc
fuzz_with_unicorn: Fix read-past-end access via jit_iter
2018-02-12 20:51:03 +00:00
MerryMage
1ba2642742
Implement DC instructions
2018-02-11 23:12:28 +00:00
MerryMage
4df6c424df
Forward declare IR::Opcode and IR::Type where possible
2018-02-11 11:52:44 +00:00
MerryMage
83a762eee7
fuzz_arm: Use SCOPE_FAIL
2018-02-08 02:14:42 +00:00
MerryMage
37b4840c6f
A64: Implement STLLRB, STLLRH, STLLR, LDLARB, LDLARH, LDLAR
2018-02-05 15:41:41 +00:00
Lioncash
1621741fc6
inst_gen: Make invalid_instructions a static inline variable
2018-02-04 19:44:29 +00:00
Lioncash
73ad0b0b00
fuzz_with_unicorn: Move instruction generator vector into GenRandomInst
...
Keeps scope localized and prevents potential static initialization issues.
2018-02-04 19:44:29 +00:00
MerryMage
9ea219e010
basic_block: Fix bogus GCC maybe-uninitialized warning
2018-02-03 03:04:44 +00:00
MerryMage
f1d2cdde34
fuzz_with_unicorn: Skip instructions that need to be interpreted
2018-02-03 01:22:40 +00:00
MerryMage
2fd70e56ce
A64: Implement FMOV (scalar, immediate)
2018-02-03 00:52:48 +00:00
MerryMage
65078d5b18
fuzz_with_unicorn: Print information on test failure
2018-01-28 22:33:34 +00:00
MerryMage
2e14326fd5
assert: Use fmt in ASSERT_MSG
2018-01-28 00:00:58 +00:00
Lioncash
7f31a9b5ab
fuzz_with_unicorn: Move data outside loop
...
Given we know we're only ever going to use one instruction, we can just presize the vector and reassign to it
instead of potentially reallocating the same memory 100000 times
2018-01-27 22:54:01 +00:00
Lioncash
763a4783f9
fuzz_with_unicorn: Dehardcode some constants
2018-01-27 22:54:01 +00:00
MerryMage
3f6889f700
A32: Change UserCallbacks to be similar to A64's interface
2018-01-27 22:45:48 +00:00