Commit graph

473 commits

Author SHA1 Message Date
Merry
3b98af5810 test_generator: Generate Arm instructions 2022-10-18 15:04:30 +01:00
Merry
f84e489969 test_generator: Expand testing to thumb32 2022-10-18 15:04:30 +01:00
Merry
78e266a869 test_generator: Increase iterations 2022-10-18 15:04:30 +01:00
Merry
3e5309bd96 tests: Add test generator 2022-10-18 15:04:30 +01:00
Merry
ecacb6cdc6 tests/rand_int: Expose PRNG 2022-10-18 15:04:30 +01:00
merry
3cb939e70b fuzz_arm: Avoid backwards jumps that may jump into code 2022-08-08 21:05:00 +01:00
Merry
b002419993 tests/{a32,a64}_unicorn: Avoid use of deprecated fmt API 2022-07-26 12:04:52 +01:00
Merry
6bcc424e1a emit_x64_vector: Ensure FPSR.QC is set even if output is invalidated 2022-07-20 19:44:39 +01:00
Merry
da2b1c5724 a32_get_set_elimination_pass: Convert NZ to NZC 2022-07-20 16:45:14 +01:00
Merry
6f106602ba a32_get_set_elimination_pass: Add option to disable NZC -> NZ conversion 2022-07-20 16:42:39 +01:00
Merry
cf08130f2c A32: Condense flag handling
Remove individual flag handlers, and handle them in chuks where able, to produce more optimal code.
2022-07-19 22:05:13 +01:00
Merry
e9b550de3a fuzz_arm: Correct unicorn overrun recovery code 2022-07-14 12:30:53 +01:00
Merry
cd85b7fdaa emit_x64: Fix bugs in fast dispatcher
* We failed to invalidate entries if there are no patches required for a location descriptor.
* Bug in A64 hashing code (rbx instead of rbp).
* Bug in A32 and A64 lookup code (inconsistent choice of key: PC vs IR::LocationDescriptor).
* Test case added.
2022-07-11 16:06:54 +01:00
Merry
d40557b751 A32/A64: Allow std::nullopt from MemoryReadCode
Raise a fault at runtime if this block is executed
2022-06-21 21:41:27 +01:00
Merry
11d12d0b84 x64_cpu_info: Update test for latest xbyak 2022-06-05 14:03:57 +01:00
Merry
57de35a821 tests: Enable tests dependent on active frontend 2022-05-28 13:27:14 +01:00
Merry
e44ac5b84c CMakeLists: Allow building on arm64 2022-05-28 13:27:14 +01:00
Merry
57af72a567 CMakeLists: Make mcl a public link dependency 2022-04-19 20:33:26 +01:00
Merry
78b4ba10c9 Migrate to mcl 2022-04-19 18:05:04 +01:00
Merry
de4154aa18 externals: Remove mp and replace uses with mcl 2022-04-19 16:28:28 +01:00
Wunkolo
f0b9cb9ccf tests/A64: Add {S,U}SHL instruction unit tests 2022-04-06 17:41:55 +01:00
merry
7b69c87ffc fuzz_arm: Add offset thumb instruction test
Test thumb instructions when (PC % 4) == 2
2022-03-20 21:05:55 +00:00
merry
dc3e70c552 fuzz_arm: Sometimes we have to step more to sync up with unicorn
This happens if unicorn happens to jump back on an IT instruction.
2022-02-27 19:51:09 +00:00
Merry
4fa646bae5 a32_unicorn: Throw on error to trigger SCOPE_EXIT code 2022-02-15 15:20:01 +00:00
Merry
c4087d68bc fuzz_arm: Don't generate thumb32_MSR_reg: Unicorn steps by 2 instead of 4 2022-02-15 15:13:41 +00:00
Merry
88906b642c fuzz_arm: Handle unicorn overrun on internal jump 2022-02-15 14:11:02 +00:00
merry
76ec1afdad fuzz_arm: Ensure that FPSCR.QC is tested 2022-02-12 22:07:26 +00:00
merry
473bbd422e test_arm_instructions: Add vmsr/vcmp/vmrs test 2022-02-12 21:43:05 +00:00
Morph
28714ee75a general: Rename files with duplicate names
In MSVC, having files with identical filenames will result into massive slowdowns when compiling.
The approach I have taken to resolve this is renaming the identically named files in frontend/(A32, A64) to (a32, a64)_filename.cpp/h
2021-12-23 11:38:58 +00:00
Wunkolo
69b831d7d2 tests: Add {S,V}ADD{V,P} tests
These are the instructions emitted for each variant of the `vaddv{q}_{s}{8,16,32,64}` intrinsic.
2021-09-27 19:54:11 +01:00
Macchiarch
f88aa570a3
cpu_info: remove tSSE4a and tSSE5 (#643)
tSSE4a and tSSE5 have been removed from xbyak
2021-09-06 20:49:10 +01:00
Merry
2bc86209bd catch: Correct include directory 2021-08-08 12:52:55 +01:00
Wunkolo
f171ce7859 tests: Add FMLA(lane) test
Math operations such as Matrix multiplication utilize these particular
instructions enough that there should be some unit tests for thesein particular.
The lane-splatting form of FMUL and FMLA instructions are of particular
interest and I've found them to be very common in retail game binaries
such as Pokemon Sword.

https://community.arm.com/developer/ip-products/processors/b/processors-ip-blog/posts/coding-for-neon---part-3-matrix-multiplication

I'm primarily adding this unit test so that I can ensure compatibility
while I tune and optimize them.
2021-08-07 23:03:57 +01:00
Merry
07b5734fb0 xbyak: Correct xbyak include directory
xbyak is intended to be installed in /usr/local/include/xbyak.
Since we desire not to install xbyak before using it, we copy the headers
to the appropriate directory structure and use that instead
2021-08-07 15:13:49 +01:00
Merry
31cefb22a0 fuzz_with_unicorn: Correct printing of vectors 2021-08-06 15:29:43 +01:00
Merry
59fb568b27 tests: Use Zydis for disassembly 2021-08-06 15:29:43 +01:00
Lioncash
9bb464a203 externals: Update fmt to 8.0.0 2021-06-23 05:04:53 -04:00
Wunkolo
a1192a51d8 tests: add F{MIN,MAX}NM tests 2021-06-20 10:12:27 +01:00
Wunkolo
759459e181 tests: Add FABS tests 2021-06-10 00:04:57 +01:00
Wunkolo
87aac2a46b tests: Add F{MIN,MAX} tests
Very minimal tests that includes some denormals and {Q,S}NANs
2021-06-08 17:50:28 +01:00
Markus Wick
0c12614d1a A64/config.h: Split fastmem and page_table options.
We might want to allocate different sizes for each of them.
e.g. for the unsafe fastmem approach without bounds checking.
Or for using the full 48bit adress range (with mirrors) by allocating our real arena as close to 1<<47 as possible.
2021-06-06 17:25:51 +01:00
MerryMage
0a77ee1a58 tests: Format to clang-format mandated style 2021-05-31 12:54:27 +01:00
merry
1672f907af github: Add build-and-test workflow 2021-05-31 12:51:47 +01:00
Jeremy Van de woestyne
b4ee976a6f unit tests & various fixes 2021-05-28 18:49:31 +01:00
Wunkolo
e8c266d0d3 tests/A64: Add VQADD/VQSUB unit tests 2021-05-28 14:13:11 +01:00
Wunkolo
dc7fb1f3ed cpu_info: Add CPU Name, Family, compact output
Compacts and formats the output a bit to be much more
concise. Sorts CPU features by alphabetical order. Mostly
to speed up `HostFeature` testing.
2021-05-24 12:25:01 -07:00
Wunkolo
3c693f2576 emit_x64_vector: AVX512VBMI implementation of EmitVectorTableLookup128
Also adds AVX512VBMI detection to host_feature
2021-05-22 22:48:31 +01:00
Wunkolo
9ba5e8e52d tests/A64: Add TBL/TBX instruction unit tests
Tests the TBL instruction with implementation with {1-4} register
lookups and the handling of out-of-bound indices.
Intended to target the implementation of VectorTableLookup128
2021-05-22 22:47:21 +01:00
MerryMage
53493b2024 Add .clang-format file
Using clang-format version 12.0.0
2021-05-22 15:07:02 +01:00
MerryMage
51b155df92 A32: Introduce PreCodeTranslationHook 2021-05-22 14:16:10 +01:00
Merry
714216fd0e Consolidate all source files into src/ directory 2021-05-19 17:41:59 +01:00
MerryMage
d93145bd04 decoder_tests: Only run ASIMD decoder test explicitly
The test is a 2 minute test whose result only really matters if the ASIMD decoder is modified.
2021-05-16 21:48:25 +01:00
Wunkolo
2c0be5e18c emit_x64_vector: AVX512 Implementation of EmitVectorNarrow{32,64}
Includes a new test case with the XTN instruction to verify
the implementation
2021-05-16 10:02:49 +01:00
MerryMage
b93ae62acf thumb32: Add coprocessor instructions 2021-05-13 18:15:35 +01:00
MerryMage
62ecc2537e print_info: Add thumb mode 2021-05-07 08:24:51 +01:00
MerryMage
61333917a4 thumb32: Implement MRS (register) 2021-05-04 12:43:38 +01:00
MerryMage
a5a210a9a5 T32: Add ASIMD instructions 2021-05-04 00:09:55 +01:00
MerryMage
d1e62b9993 T32: Add VFP instructions 2021-05-04 00:09:55 +01:00
MerryMage
cd837c5b37 A32: Merge ArmTranslateVistor and ThumbTranslateVisitor 2021-05-04 00:09:55 +01:00
MerryMage
6404f58d23 rsqrt_test: Fix on GCC 2021-05-01 20:33:14 +01:00
MerryMage
f35d98c923 fuzz_with_unicorn: Widen scope of floating point fuzzing 2021-04-26 00:26:28 +01:00
MerryMage
7bc9e36ed7 emit_x64_floating_point: Optimize 32-bit EmitFPRSqrtEstimate 2021-04-26 00:26:28 +01:00
MerryMage
e19f898aa2 ir: Reorganize to new top level folder 2021-04-21 22:22:07 +01:00
Lioncash
f5263cc196 thumb32: Implement exclusive loads
Implements the remaining loads for ARMv7
2021-04-19 19:46:19 +01:00
Lioncash
6241ff6be2 thumb32: Implement STREX variants
Implements the exclusive store instructions. Now all that remains for
ARMv7 load/stores to be done is the exclusive loads.
2021-04-10 17:15:19 +01:00
emuplz
6d4333c78e fixed data + instruction cache callbacks (w/ tests) 2021-02-17 20:38:08 +00:00
rufi
77621a8448 implemented other ic instructions 2021-02-17 20:38:08 +00:00
emuplz
8728444af8 added support for instruction ic ivau 2021-02-17 20:38:06 +00:00
MerryMage
f77b0e2fbe A32/thumb16: Implement IT instruction 2021-02-07 20:41:48 +00:00
MerryMage
68bd9547c5 fuzz_arm: Correctly print thumb instruction listing 2021-02-07 20:41:48 +00:00
MerryMage
a599c29d9e testenv: Ignore warning C4309 2021-02-07 09:57:17 +00:00
MerryMage
b252636dc3 a32_unicorn: Halt when PC leaves code_mem 2021-02-06 22:15:02 +00:00
MerryMage
331a02e02e fuzz_arm: Add fuzzing for thumb instructions 2021-02-06 21:41:01 +00:00
Lioncash
23619c8c6a thumb32: Implement SHSUB8/UHSUB8 2021-02-01 17:50:46 -05:00
Lioncash
9d2570470e thumb32: Implement SHADD8/UHADD8 2021-02-01 17:50:46 -05:00
Lioncash
afad76078d thumb32: Implement SHSUB16/UHSUB16 2021-02-01 17:50:46 -05:00
Lioncash
51b7c32d02 thumb32: Implement SHSAX/UHSAX 2021-02-01 17:50:46 -05:00
Lioncash
f0a219fcd0 thumb32: Implement SHASX/UHASX 2021-02-01 17:50:46 -05:00
Lioncash
94f8efbb03 thumb32: Implement SHADD16/UHADD16 2021-02-01 17:50:46 -05:00
Lioncash
aa49b0db89 thumb32: Implement QSUB8/UQSUB8 2021-02-01 17:50:46 -05:00
Lioncash
874ab6a7b6 thumb32: Implement QADD8/UQADD8 2021-02-01 17:50:46 -05:00
Lioncash
d923fb24c6 thumb32: Implement QSUB16/UQSUB16 2021-02-01 17:50:46 -05:00
Lioncash
416fe26df0 thumb32: Implement QSAX/UQSAX 2021-02-01 17:50:14 -05:00
Lioncash
ad7c8bd042 thumb32: Implement QASX/UQASX 2021-02-01 17:31:30 -05:00
Lioncash
f52b8f924c thumb32: Implement QADD16/UQADD16 2021-02-01 17:31:30 -05:00
Lioncash
6f593da41b thumb32: Implement SSUB8/USUB8 2021-02-01 17:31:27 -05:00
Lioncash
271354ee95 thumb32: Implement SADD8/UADD8 2021-02-01 16:44:11 -05:00
Lioncash
8f42fd5c0e thumb32: Implement SSUB16/USUB16 2021-02-01 16:41:02 -05:00
Lioncash
0e28c63456 thumb32: Implement SSAX/USAX 2021-02-01 16:36:18 -05:00
Lioncash
21e404d3ab thumb32: Implement SASX/UASX 2021-02-01 16:31:25 -05:00
Lioncash
d529417875 thumb32: Implement SADD16/UADD16 2021-02-01 16:19:33 -05:00
Lioncash
36fc596a51 thumb32: Implement QADD 2021-02-01 15:44:09 -05:00
Lioncash
cd6e4c7afd thumb32: Implement QSUB 2021-02-01 15:42:14 -05:00
Lioncash
65365ad2a3 thumb32: Implement QDADD 2021-02-01 15:39:39 -05:00
Lioncash
c60cf921ee thumb32: Implement REV 2021-02-01 15:30:40 -05:00
Lioncash
0304dc7ce4 thumb32: Implement REV16 2021-02-01 15:27:31 -05:00
Lioncash
cee31c5274 thumb32: Implement RBIT 2021-02-01 15:20:24 -05:00
Lioncash
e2bc7eeb93 thumb32: Implement REVSH 2021-02-01 15:16:53 -05:00
Lioncash
95dabcf48e fuzz_thumb: Allow running only Thumb-16 tests 2021-02-01 15:04:29 -05:00
Lioncash
1ad99bb9b5 thumb32: Implement SEL 2021-02-01 15:01:21 -05:00