Commit graph

539 commits

Author SHA1 Message Date
MerryMage
60d9392b5c block_of_code: BlockOfCode should provide cpu info 2020-04-22 20:22:01 +01:00
MerryMage
148c01e08f interface_x64: Remove is_executing assert from HaltExecution
In multithreaded code this can be triggered due to a race.
2017-10-14 23:35:01 +01:00
MerryMage
f6cf265bc5 block_of_code: BlockOfCode::ABI_* should be const 2017-09-29 01:35:24 +01:00
MerryMage
29471be317 Standardize location of storage-class specifiers: Place at beginning of declarations
Justification: C99 specifies that doing otherwise is an obsolescent feature.
2017-09-29 01:23:45 +01:00
MerryMage
b992e5f8ec Ranged cache invalidation
* Fix clearing code block on a partial invalidation
* Remove unnecessary use of boost::variant
* Code cleanup
2017-09-11 00:11:05 +01:00
Lioncash
80477b5a67 externals: update fmt to 4.0 2017-08-27 21:43:21 +01:00
MerryMage
568b52d4ba externals: Update Xbyak to v5.51
Xbyak now supports multi-byte nops
2017-08-17 21:34:54 +01:00
MerryMage
1613846ab0 reg_alloc: Handle XMM registers in LoadImmediate 2017-08-16 23:11:05 +01:00
MerryMage
993e142c6b disassembler: Fix RegList 2017-08-05 01:57:29 +01:00
MerryMage
6197bde0fc disassembler_arm: Fix disassembly of LDRH (reg) 2017-07-30 18:45:55 +01:00
Yuri Kunde Schlesner
38eb7e0314 emit_x64: Use alternative Xbyak names for and, or, xor
Also enabled XBYAK_NO_OP_NAMES, allowing us to stop using
-fno-operator-names.
2017-06-12 07:57:46 +01:00
James Rowe
82e8c99a47 Link against static fmtlib instead of header only
When including fmtlib as a header only library in dynarmic, downstream
projects cannot include fmtlib as a static library without getting
linker errors.
2017-05-22 08:23:03 +01:00
MerryMage
599a613fea Move SEL from status_register_access to misc 2017-04-25 13:57:27 +01:00
MerryMage
50bb317104 parallel: UQADD8 and UQADD16 are unpredictable when {d|n|m} == 15 2017-04-25 13:45:31 +01:00
MerryMage
7639dfea51 coprocessor: Use && instead of & with boolean arguments 2017-04-22 15:05:31 +01:00
MerryMage
2c9dcfa2db backend_x64: Rename UnwindHandler to ExceptionHandler 2017-04-20 14:08:56 +01:00
MerryMage
0d47f50f57 block_of_code: Implement farcode 2017-04-19 18:58:36 +01:00
MerryMage
1c21ae6bcd saturated: Implement QASX, QSAX, UQASX, UQSAX 2017-04-10 10:21:51 +01:00
MerryMage
9ac890c62d reg_alloc: Fix for LLVM's interpretation of the System V ABI
This aspect of the System V ABI is under-defined. LLVM choses a
different interpretation from GCC and ICC.

Most other compilers assume the callee is responsible zero-ing the
upper bits of the register if necessary. LLVM assumes the caller
has zero-extended the register.

This is a quick fix for this problem until zext-tracking is
implemented.
2017-04-08 22:12:37 +01:00
MerryMage
a5bb81a97c backend_x64: Remove dispatch loop in Jit::Run 2017-04-08 10:04:53 +01:00
MerryMage
1b37420459 backend_x64: Simplify dispatcher 2017-04-08 09:35:45 +01:00
MerryMage
523ae542f4 microinstruction: Implement HasAssociatedPseudoOperation 2017-04-04 13:10:50 +01:00
MerryMage
4c5de3905b emit_x64: Correct mutation of immutable in FPThreeOp{32,64}
operand (args[1]) was erroneously declared as non-scratch.
operand's value could be modified if FTZ was enabled.
2017-04-01 09:57:14 +01:00
MerryMage
05e97058c3 parallel: Add and Subtract with Exchange improvements
* Remove asx argument from PackedHalvingSubAdd{U16,S16} IR instruction
* Implement Packed{Halving,}{AddSub,SubAdd}{U16,S16} IR instructions
* Implement SASX, SSAX, UASX, USAX
2017-03-24 15:56:24 +00:00
Lynn
fd068ed6b8 Ranged cache invalidation 2017-03-20 11:58:25 +00:00
MerryMage
d9c69ad997 constant_pool: Implement a constant pool 2017-03-19 13:08:04 +00:00
Lioncash
5a02da445a CMakeLists: Only link LLVM libs against the library
LLVM library code is only used within the main dynarmic library, not the test executable.
2017-03-11 13:25:14 +00:00
Lioncash
d85137ed65 interface_x64: Amend LLVM disassembly code
This would previously attempt to perform pointer arithmetic on void pointers,
which would cause compilation errors.
2017-03-07 18:32:04 +00:00
Lioncash
d0efbb9348 CMakeLists: Remove unnecessary linker language specifiers
This is already inferred by the cmake project being declared a CXX project.
2017-03-07 18:30:58 +00:00
Lioncash
9906be746f CMakeLists: Make boost an interface library target
Gets rid of the use of a non-target include and makes libraries
explicitly link against the identifier name in order to get includes.
2017-03-04 11:52:32 +00:00
MerryMage
6396bd02f0 Merge branch 'simplify-reg-alloc' 2017-02-27 00:11:52 +00:00
MerryMage
92a01b0cd8 Prefer ASSERT to DEBUG_ASSERT 2017-02-26 23:30:40 +00:00
MerryMage
135346eb2e reg_alloc: Move implementations out of header 2017-02-26 23:30:39 +00:00
MerryMage
184db36caf reg_alloc: Call DecrementRemainingUses in only one place 2017-02-26 23:30:38 +00:00
MerryMage
51fc9fec05 reg_alloc: Reorganize 2017-02-26 23:30:37 +00:00
MerryMage
cf93ab3d31 reg_alloc: Remove old register allocator interface 2017-02-26 23:12:26 +00:00
MerryMage
08a467bf9a emit_x64: Port to new register allocator interface 2017-02-26 23:12:25 +00:00
Lioncash
662e07337f CMakeLists: Don't explicitly signify dynarmic as a static lib
This allows a user of the library to explicitly control which kind of
library type should be built with the CMake BUILD_SHARED_LIBS flag.

By default, libraries will build as static without this specifier.
2017-02-26 23:08:49 +00:00
MerryMage
f883bad2cc reg_alloc: New register allocation interface 2017-02-26 21:37:35 +00:00
MerryMage
13ac0c234e reg_alloc: Differentiate between ReadLock and WriteLock 2017-02-26 21:37:34 +00:00
MerryMage
6c3df057fa reg_alloc: Remove unused functions 2017-02-26 21:37:33 +00:00
MerryMage
1ee4c07f14 reg_alloc: Reimplement ScratchHostLocReg 2017-02-26 21:37:32 +00:00
MerryMage
640faab8a7 reg_alloc: UseHostLoc is no longer necessary 2017-02-26 21:37:30 +00:00
MerryMage
9518bbe06e reg_alloc: Reimplement UseScratchHostLocReg 2017-02-26 21:37:29 +00:00
MerryMage
e1d8238c50 reg_alloc: Stub UseOpArg 2017-02-26 21:37:27 +00:00
MerryMage
2b078152e7 reg_alloc: Reimplement UseHostLocReg 2017-02-26 21:37:26 +00:00
MerryMage
aefe550428 reg_alloc: Remove the Def concept from register allocator internals 2017-02-26 21:37:25 +00:00
MerryMage
65cccf070e reg_alloc: Properly encapsulate HostLocInfo 2017-02-26 21:37:24 +00:00
MerryMage
469bb6253f backend_x64: Factor EmitExclusiveWriteMemory64 into ExclusiveWrite 2017-02-26 15:34:26 +00:00
MerryMage
d7ab1f9c64 backend_x64: Fix ABI violation in ReadMemory and WriteMemory
Caller-save registers were not saved before call instruction.

Refer to issue #98.
2017-02-26 15:34:25 +00:00
MerryMage
3768174783 ir_opt: Constant propagation pass works better with a DCE just before it 2017-02-26 15:28:35 +00:00
MerryMage
157585887e ir_opt: Simplify dead-code elimination pass 2017-02-26 15:28:34 +00:00
MerryMage
bbeea72eba ir_opt: Remove redundant shift instructions 2017-02-26 15:28:14 +00:00
MerryMage
517fe0f18e emit_x64: WriteMemory* microinstructions do not define a value 2017-02-25 11:54:47 +00:00
MerryMage
1ff60bc69f reg_alloc: Move OpArg into own header 2017-02-21 23:38:36 +00:00
MerryMage
4ed8ee7489 microinstruction: Void arguments when invalidating instruction 2017-02-18 21:29:23 +00:00
MerryMage
7fa5845c1f extension: Implement SXTAB16 and SXTB16 2017-02-18 20:14:44 +00:00
MerryMage
73d1cf36c3 extension: Simplify UXTB16 2017-02-18 20:14:39 +00:00
MerryMage
6edcfeba0b extension: Simplify rotation code 2017-02-18 20:14:37 +00:00
MerryMage
cc9d2c4603 saturated: Implement SSAT16 and USAT16 2017-02-18 17:43:57 +00:00
MerryMage
358cf7c322 vfp: Implement vectorized VFP instructions 2017-02-18 01:13:25 +00:00
MerryMage
f2dd82967f load_store: Simplify implementation
* Remove dead code
* Standardise code style with rest of code base
2017-02-16 22:28:56 +00:00
MerryMage
058f7b5de6 emit_x64: Make EmitTerminal type-safe
Avoid the use of boost::variant::which, which tends to produce code which
is not verifiable at compile-time.
2017-02-16 19:40:51 +00:00
MerryMage
e197b10b96 common: Introduce utility function VisitVariant
VisitVariant allows one to use a generic lambda to visit a boost::variant.
This is necessary because boost::visit_variant requires the visitor type
to provide a return type.
2017-02-16 19:30:56 +00:00
MerryMage
5a20a37d3f arm/fpscr: Correct Stride implementation 2017-02-11 12:13:57 +00:00
MerryMage
033e8b9b1e vfp: Rename variables a, b, c to more sensible names 2017-02-06 21:14:36 +00:00
MerryMage
2af39dfaa8 emit_x64: Make reg_alloc a local variable
reg_alloc contains state that is only valid on a per-block basis, so there
is no reason for it to be a member variable.
2017-02-04 09:29:35 +00:00
MerryMage
a0e9417912 ir_opt: Initial constant propagation pass implementation 2017-01-30 21:49:46 +00:00
MerryMage
2447f2f360 callbacks: Factorize memory callbacks into inner structure 2017-01-30 21:42:51 +00:00
MerryMage
642ccb0f66 ir/value: Support U16 immediates 2017-01-29 22:58:11 +00:00
MerryMage
5f7ffe0d0b microinstruction: Implement Inst::AreAllArgsImmediates 2017-01-29 22:56:59 +00:00
MerryMage
22804dc6a5 microinstruction: Arguments of Inst::Use and Inst::UndoUse should be const 2017-01-29 22:53:46 +00:00
MerryMage
1d4446cad5 microinstruction: Removed unnecessary reference from argument of Inst::ReplaceUsesWith 2017-01-29 22:52:33 +00:00
MerryMage
3e0e339d98 bit_util: Remove unnecessary include 2017-01-09 22:19:51 +00:00
MerryMage
9ecdd32b84 coprocessor: Implement fast-path for Coproc{Send,Get}{OneWord,TwoWords}
Allow coprocessor interface to provide pointers instead of a callback.
This allows for a fastpath when all that is required is to read or write a
value and no other action needs to be taken.
2017-01-08 14:56:06 +00:00
MerryMage
e3bc7d039f Implement CDP, LDC, MCR, MCRR, MRC, MRRC, STC 2017-01-08 14:56:06 +00:00
MerryMage
48693eb6ff Implement coprocessor-related microinstructions
* CoprocInternalOperation
* CoprocSendOneWord
* CoprocSendTwoWords
* CoprocGetOneWord
* CoprocGetTwoWords
* CoprocLoadWords
* CoprocStoreWords
2017-01-08 14:56:06 +00:00
MerryMage
b3ae57619d types: Formatting for CoprogReg 2017-01-08 14:56:06 +00:00
MerryMage
d8a37e287c IR: Add IR type CoprocInfo 2017-01-08 14:56:06 +00:00
MerryMage
890b2f75ad callbacks: Add coprocessor interface 2017-01-08 14:56:06 +00:00
MerryMage
1efd3a764d IR: Remove unused microinstructions NegateLowWord and NegateHighWord 2017-01-05 20:16:39 +00:00
Fernando Sahmkow
70f4235ee9 Implement UXTAB16 (#78) 2016-12-29 12:15:18 +00:00
MerryMage
0d1fa85402 bit_util: Bit<T>(size_t, const T) cannot be constexpr
Compound statements are not permitted in constexpr functions in C++14
2016-12-29 10:08:35 +00:00
FernandoS27
d5610eb26c Implement UHASX, UHSAX, SHASX and SHSAX (#75) 2016-12-28 21:32:22 +00:00
MerryMage
e9df248d56 decoder_detail: Support const member functions 2016-12-23 11:33:40 +00:00
MerryMage
163b67bf1f mp: Add support for const member function pointers to FunctionInfo 2016-12-23 11:32:12 +00:00
MerryMage
b1bad4b5cc decoder_detail: static_assert member function is from visitor class
Improves readability of compiler errors.
2016-12-23 11:10:02 +00:00
MerryMage
c7e5216473 emit_x64: EraseInstruction now also invalidates the instruction
There is now no longer a need to call DecrementRemainingUses on the parent
instruction.
2016-12-22 18:43:11 +00:00
MerryMage
c78f153ddb decoder/arm: Sort decoders according to number of bits in mask 2016-12-22 15:25:38 +00:00
MerryMage
cb38c94b58 decoder/arm: Fix decoding of RFE 2016-12-22 15:25:07 +00:00
MerryMage
7e77ee7fd6 decoder/arm: Fix decoding of MCR2 2016-12-22 15:11:47 +00:00
Fernando Sahmkow
677f62dd6f Implement SHSUB8 and SHSUB16 (#74)
* Implement IR operations PackedHalvingSubS8 and PackedHalvingSubS16
2016-12-22 12:02:24 +00:00
MerryMage
967f3cf7e1 Implement CPS (Thumb)
* Since currently only User mode is emulated, CPS is a NOP.
2016-12-21 22:44:27 +00:00
MerryMage
c764a2b889 Implement MUL (T1) 2016-12-21 22:44:14 +00:00
MerryMage
36082087de callbacks: Read code using MemoryReadCode callback 2016-12-21 21:39:14 +00:00
MerryMage
56ea2386d3 saturated: Implement SSAT and USAT 2016-12-21 19:51:25 +00:00
MerryMage
6a269a6ebd IR: Add microinstructions UnsignedSaturation and SignedSaturation 2016-12-21 19:51:25 +00:00
MerryMage
b23b524b03 bit_util: Add SignExtend implementation with runtime bit_count argument 2016-12-21 19:51:25 +00:00
MerryMage
02b2ab7581 emit_x64: Pass tmp to ExtractMostSignificantBitFromPackedBytes in EmitPackedAddU8 2016-12-20 22:07:51 +00:00
MerryMage
097f6a83da emit_x64: Document ExtractAndDuplicateMostSignificantBitFromPackedWords 2016-12-20 22:06:14 +00:00