Commit Graph

2827 Commits

Author SHA1 Message Date
Yang Liu
4324b262aa backend/rv64: Add biscuit as the assembler 2024-03-02 19:38:46 +00:00
Yang Liu
a4b9b431b0 backend/rv64: Add initial RISC-V framework
RISC-V target is now compilable.
2024-03-02 19:38:46 +00:00
Ash
732a657694 Change Config to make fastmem_pointer of zero valid.
This changes Dynarmic::A32/A64::Config to store fastmem_pointer in
a std::optional<uintptr_t>, allowing the user to pass a zero base
address for the guest memory, which can be used to effectively
implement a shared address space between the host and the guest.
2024-03-02 16:31:20 +00:00
zmt00
f884bc0dfc emit_x64_vector: Implement AVX2 AVShift64 2024-02-24 17:08:27 +00:00
zmt00
879142d424 emit_x64_vector: Refactor AVX2 AVShift32, LVShift{32,64} 2024-02-24 17:08:27 +00:00
zmt00
2c0dc88715 emit_x64_vector: Implement AVX2 UnsignedRoundingShiftLeft{32,64} 2024-02-20 14:16:15 +00:00
zmt00
4f08226e0e emit_x64_vector: Refactor pre-SSE4.1 min/max instruction replacements 2024-02-17 13:17:01 +00:00
zmt00
0adc972cd9 emit_x64_vector: Optimize VectorSignedSaturatedAbs 2024-02-13 18:46:42 +00:00
Merry
69dc836977 backend/arm64: A64: Implement DumpDisassembly 2024-02-13 02:21:22 +00:00
Merry
4ae4750b5a emit_arm64_a64: Take into account currently loaded FPSR
Previously we just retrieved the last stored FPSR and used that when the guest asks for the current FPSR.
This is incorrect behaviour. We failed to take into account the current state of the host FPSR.

Here we take this into account. This bug was discovered via #795.
2024-02-13 02:19:55 +00:00
Merry
ee84ec0bb9 backend/x64: Reduce races on invalidation requests in interface
This situation occurs when RequestCacheInvalidation is called from
multiple threads. This results in unusual issues around memory
allocation which arise from concurrent access to invalid_cache_ranges.

There are several reasons for this:
1. No locking around the invalidation queue.
2. is_executing is not multithread safe.

So here we reduce any cache clear or any invalidation to raise a
CacheInvalidation halt, which we execute immediately before or
immediately after Run() instead.
2024-02-10 19:31:07 +00:00
Wunkolo
18717d216c emit_x64_vector: AVX512+GNFI implementation of EmitVectorLogicalVShift8 2024-02-10 11:38:17 +00:00
zmt00
0785a6d027 ir: Implement FPMulSub 2024-02-10 11:31:54 +00:00
Wunkolo
eb5eb9cdf7 emit_x64_vector: GNFI implementation of EmitVectorCountLeadingZeros8 2024-02-06 18:15:34 +00:00
Merry
75235ffedb emit_x64_data_processing: Exclude edge case from lea path in EmitSub
-0xffff'ffff'8000'0000 = 0x0000'0000'8000'0000 which is not a representable displacement
2024-01-31 01:41:25 +00:00
Merry
24bf921ff9 constant_propagation_pass: x + 0 == x 2024-01-30 23:10:23 +00:00
Merry
ca2cc2c4ba emit_x64_data_processing: Emit lea where possible in EmitAdd and EmitSub 2024-01-30 22:59:41 +00:00
Merry
30f1a3c628 Avoid emplace. 2024-01-30 17:32:50 +00:00
Merry
85177518d7 emit_x64_vector: Improve AVX512 implementation of EmitVectorTableLookup128 2024-01-30 00:29:12 +00:00
Merry
0f20181a45 emit_x64_vector: Fix AVX-512 implementation of EmitVectorTableLookup64 2024-01-30 00:29:12 +00:00
Merry
2ee3eacd01 emit_x64_crc32: Correct use of x64 crc32 instruction
CRC32 r32, r/m64 variant does not exist, but CRC r64, r/m64 does what we want.
2024-01-29 22:42:17 +00:00
zmt00
314ab7a462 emit_x64_vector: Implement PairedMinMax{Lower}8 2024-01-28 18:56:42 +00:00
Merry
ac9003fb78 externals: Update oaknut to 2.0.1
Merge commit 'a37f3673f8ca59a0c7046616247db1c6bc00e131'
2024-01-28 17:02:58 +00:00
Merry
bbc058c76b backend/arm64: Update for oaknut 2.0.0.
Also respect DYNARMIC_ENABLE_NO_EXECUTE_SUPPORT.
2024-01-28 16:19:33 +00:00
Merry
05f38d1989 A32: Implement VCVT{A,N,P,M} (ASIMD) 2024-01-28 11:21:08 +00:00
Merry
c9fcb695a4 A32: Correct function naming convention for VRINT{N,X,A,Z,M,P} (ASIMD) 2024-01-28 11:10:58 +00:00
Merry
c67f38b57e backend/arm64: FPVectorRoundInt{32,64}: FPCR comparisons should be made with fpcr_controlled when under scope of MaybeStandardFPSCRValue 2024-01-28 10:55:59 +00:00
Merry
f8e38809e9 A32: Implement VRINT{N,X,A,Z,M,P} (ASIMD) 2024-01-28 10:19:15 +00:00
Steveice10
8398d7ef7e arm64: Fix compiling under MSYS2 CLANGARM64. 2024-01-27 08:54:07 +00:00
Wunkolo
00c6c00e86 Refactor Xmm{B}Const to {,B}Const 2024-01-23 19:24:56 +00:00
Wunkolo
917335ae8a block_of_code: Add XmmBConst
This is a redo of https://github.com/merryhime/dynarmic/pull/690 with a
much smaller foot-print to introduce a new pattern while avoiding the
initial bugs
(5d9b720189)

**B**roadcasts a value as an **Xmm**-sized **Const**ant. Intended to
eventually encourage more hits within the constant-pool between vector
and non-vector code.
2024-01-23 19:24:56 +00:00
Wunkolo
b02292bec7 block_of_code: Rename MConst to XmmConst
`MConst` is refactored into `XmmConst` to clearly communicate the
addressable space of the newly allocated 16-byte memory constant.
2024-01-23 19:24:56 +00:00
zmt00
ba9009abd8 emit_x64_vector: Optimize VectorSignedAbsoluteDifference 2024-01-23 18:28:19 +00:00
Merry
331b41bc93 decoder/arm: Improve performance of arm decoding by adding LUT 2024-01-13 15:04:33 +00:00
zmt00
1c97fd5ec5 emit_x64_vector: Implement PairedMinMax{Lower}16 2024-01-10 12:23:28 +00:00
merry
7256f497d2 ir_emitter: Fix CallHostFunction 2024-01-09 15:57:58 +00:00
zmt00
2780b2318d emit_x64_vector: Implement SSE4.1 PairedMinMaxLower32 2024-01-02 19:04:02 +00:00
zmt00
8ef0f2b54f emit_x64_vector: Add SSSE3 implementation of VUZP{1,2}.8B 2023-12-17 21:56:55 +00:00
zmt00
73a75b5034 emit_x64_vector: Add SSE4.1 implementation of VUZP1.8H 2023-12-11 13:18:19 +00:00
zmt00
a43c176fc3 emit_x64_vector: Add SSSE3 implementation of VUZP{1,2}.4H 2023-12-11 13:18:19 +00:00
zmt00
4c2bd4ed29 emit_x64_vector: Add SSE4.1 implementation of VUZP{1,2}.2S 2023-12-02 20:33:45 +00:00
kynex7510
9d1bc6ecc2 A32: Introduce PreCodeReadHook (#763)
* A32: Introduce PreCodeReadHook

* A32: Invert code read hook return value
2023-11-16 22:23:27 +00:00
Liam
0df09e2f6b exception_handler: connect installation to instance lifetime 2023-10-08 16:24:10 +01:00
scribam
ac643f1bee exception_handler_posix: Support NetBSD and OpenBSD 2023-10-08 09:45:07 +01:00
Merry
29dde29560 emit_x64_vector_floating_point: RSqrtEstimate: Add AVX implementation 2023-08-28 14:15:20 +01:00
Merry
adac93f12e emit_x64_vector_floating_point: FPVectorMulAdd: Minimize full fallback 2023-08-28 14:15:20 +01:00
Merry
ceea80dd59 emit_x64_vector_floating_point: Implement GetNonSignMaskVector 2023-08-28 12:57:20 +01:00
Merry
92a47c8db2 emit_x64_floating_point: FPMulAdd: Inline NaN handling 2023-08-28 09:45:46 +01:00
Andrea Pappacoda
831984b519 build: set SOVERSION to major.minor
Dynarmic uses semantic versioning, restricting backwards-incompatible
changes to major releases. This backwards compatibility, though, refers
to API changes, and disregards ABI stability. Since having to maintain a
compatible ABI between major releases is somewhat of a pain, and it
arguably doesn't matter that much for dynarmic, setting the SOVERSION to
major.minor allows for breaking ABI changes to be made between feature
releases, and not only major ones.

To be clear, this patch doesn't try to enforce a new policy, but just
reflects how the project has handled ABI changes in the past. That is,
these kind of changes have been made already.

This patch comes as a fix for Debian bug <https://bugs.debian.org/1041270>.
2023-07-20 23:41:08 +01:00
comex
40636020fc exception_handler_macos: Avoid undefined behavior due to accessing misaligned pointer
Caught by UBSan.  I don't think this has a meaningful performance impact
(especially since the thread state doesn't include floating-point/vector
registers), but I haven't tested it.
2023-07-09 10:38:44 +01:00