1689 Commits

Author SHA1 Message Date
Lioncash
67c39ec79b
frontend/A32/ir_emitter: Mark PC() and AlignPC() as const-qualified member functions
These don't modify instance state, so they can be const-qualified member
functions.
2019-02-05 20:21:48 -05:00
Lioncash
539fda5350
frontend/A64/ir_emitter: Mark PC() and AlignPC() as const qualified member functions
These don't actually alter any instance state.
2019-02-05 20:21:44 -05:00
Annomatg
735e6c58be Reduce Inst::NumArgs calls / opcodes: Prefer std::vector to std::map (#425)
* Don't call Inst::NumArgs in a loop conditional
* opcodes: Prefer a simple std::vector instead of a std::map
2019-02-03 20:21:14 +00:00
Merry
7957066968
Merge pull request #423 from lioncash/catch
externals: Update catch to v2.5.0
2019-02-02 22:59:54 +00: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
Merry
dced81eec0
Merge pull request #421 from lioncash/comma
tests/.../vfp_helper: Amend use of the comma operator
2019-02-02 22:59:27 +00:00
Mat M
6cdb4e3d8c
Merge pull request #424 from meme/readme
Correct README (`jit` to `cpu`)
2019-02-01 00:31:35 -05:00
meme
23eeb5ebae Correct README (jit to cpu) 2019-01-31 12:53:00 -05:00
Lioncash
69eec29993
externals: Update catch to v2.5.0
Keeps the unit testing library up to date.
2019-01-28 08:51:03 -05: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
6598d2147e
Merge pull request #419 from lioncash/fold-op
constant_propagation_pass: Fold byte reversal opcodes where applicable
2018-11-25 09:50:56 +00:00
Lioncash
70a392af9e
constant_propagation_pass: Fold byte reversal opcodes where applicable
These are reasonably trivial to fold away when applicable. We just
perform the swap and replace the instruction with the constant value.
2018-11-24 18:11:08 -05:00
Merry
79d51f8d4a
Merge pull request #418 from lioncash/fold-op
constant_propagation_pass: Handle folding for Least/MostSignificant{Bit, Byte, Half, Word} opcodes
2018-11-24 12:45:26 +00: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
Merry
bd8c467132
Merge pull request #415 from lioncash/alloc
a64_emit_x64: Convert std::vector instances in GenFastmemFallbacks() to std::array
2018-11-24 12:44:08 +00:00
Merry
6eeec2f9d0
Merge pull request #414 from lioncash/retval
fuzz_util: Simplify result return in InstructionGenerator's Generate() function
2018-11-24 12:43:40 +00:00
Lioncash
043cace402
constant_propagation_pass: Handle folding for Least/MostSignificant{Bit, Byte, Half, Word} opcodes
These are quite trivial to fold.
2018-11-23 23:11:00 -05: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
54aac80504
a64_emit_x64: Make constness of loop elements explicit within GenFastmemFallbacks() 2018-11-23 20:12:55 -05:00
Lioncash
4763bb706e
a64_emit_x64: Convert std::vector instances in GenFastmemFallbacks() to std::array
Given these are quite small, we can avoid the need to heap allocate
here.
2018-11-23 20:11:12 -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
MerryMage
b781237151 emit_x64_vector_floating_point: AVX && DN implementation of EmitFPVectorMulX 2018-11-18 10:03:13 +00:00
MerryMage
e9acec2091 A64: Implement FMULX (by element), single and double precision variants 2018-11-17 21:51:39 +00:00
MerryMage
ea0c1919bb A64: Implement FMULX, vector single-precision and double-precision variant 2018-11-17 21:32:12 +00:00
MerryMage
333d3b734d IR: Implement FPVectorMulX 2018-11-17 21:31:22 +00:00
Michał Janiszewski
af96812b47 Provide justification for always-true condition (#412) 2018-11-02 19:36:30 +00:00
Michał Janiszewski
4295f727cd Enable ninja and ccache on travis (#413)
* Use ninja, the fast build system

Make is known to be rather slow, but it's possible to generate other
build system files with CMake, so use a faster one.

* Use ccache on Travis

* Dummy commit to test ccache
2018-11-01 12:33:45 +00:00
Merry
a5f35d45f0
Merge pull request #411 from janisozaur/include-guards
Add missing include guards
2018-11-01 12:33:09 +00:00
Michał Janiszewski
a695635efd Add missing include guards 2018-10-31 22:54:17 +01:00
Merry
52e646408f
Merge pull request #409 from VPeruS/switch-optional
Switch boost::optional to std::optional
2018-10-24 18:49:49 +01:00
V.Kalyuzhny
05a2dbfce0 Switch boost::optional to std::optional 2018-10-24 15:02:39 +00:00
Merry
409ff8d78e
Merge pull request #410 from lioncash/catch
externals: Update catch to v2.4.1
2018-10-24 07:32:38 +01:00
Lioncash
1c0bed959d
externals: Update catch to v2.4.1
Keeps the unit testing library up to date.
2018-10-23 18:10:58 -04:00
Merry
d0bcca81a8
Merge pull request #408 from lioncash/shift
constant_propagation_pass: Add 64-bit variants of shifts to the pass
2018-10-12 20:22:29 +01:00
Lioncash
2c8c83c2f1
constant_propagation_pass: Add 64-bit variants of shifts to the pass
These optimizations can also apply to the 64-bit variants of the shift
opcodes; we just need to check if the instruction has an associated
pseudo-op before performing the 32-bit variant's specifics.

While we're at it, we can also relocate the code to its own function
like the rest of the cases to keep organization consistent.
2018-10-12 14:50:21 -04:00
Merry
fc051d2c5c
Merge pull request #407 from lioncash/div
constant_propagation_pass: Fold division operations where applicable
2018-10-11 15:50:47 +01:00
Lioncash
b55b7a5c7f
constant_propagation_pass: Fold division operations where applicable
We can fold division operations if:

1. The divisor is zero, then we can replace the result with zero (as this is how
ARM platforms expect it).
2. Both values are known, in which case we can just do the operation and
store the result
3. The divisor is 1, in which case just return the other operand.
2018-10-09 16:03:47 -04:00
Merry
c3a1558dfc
Merge pull request #406 from lioncash/mul
constant_propagation_pass: Fold Mul32 and Mul64 cases where applicable
2018-10-09 15:11:36 +01:00
Merry
caea0460ca
Merge pull request #405 from lioncash/inst
a64: Add ARMv8.4+ instructions encodings to the encoding table
2018-10-08 08:35:04 +01:00
Lioncash
a5d1d27c8c
constant_propagation_pass: deduplicate common 32/64 bit checking for results in folding functions
It's common for an folding operation to apply to both the 32-bit and
64-bit variant of the same opcode, which leads to checking which kind of
result we need to store the value as. This moves it to its own function,
so that we don't need to duplicate it in various functions.
2018-10-07 22:16:40 -04:00
Lioncash
a0ea3a566a
constant_propagation_pass: Fold Mul32 and Mul64 cases where applicable
Multiplication operations can currently be folded if:

1. Both arguments are known constant values
2. Either operand is zero (in which case the result is also zero)
3. Either operand is one (in which case the result is the non-one
operand).
2018-10-07 22:16:01 -04:00
Merry
e6ccf2e79d
Merge pull request #404 from lioncash/fold
constant_propagation_pass: Extend folding of sign-extension/zero-extension opcodes
2018-10-07 16:40:11 +01:00
Lioncash
62a2ba7981
a64: Add ARMv8.4+ instructions encodings to the encoding table
Keeps the table up to date with the ARM specification.
2018-10-06 02:27:50 -04:00
Lioncash
f1d907c980
constant_propagation_pass: Fold SignExtend{Type}ToLong opcodes if possible 2018-10-05 21:06:57 -04:00
Lioncash
4f03ca65a0
constant_propagation_pass: Fold SignExtend{Type}ToWord opcodes if possible 2018-10-05 21:06:57 -04:00
Lioncash
f47c5e4ede
constant_propagation_pass: Fold ZeroExtend{Type}ToLong opcodes if possible
These are equivalent to the ZeroExtendXToWord variants, so we can
trivially do this as well.
2018-10-05 21:06:57 -04:00
Lioncash
e0eec323f2
constant_propagation_pass: Combine zero-extension folding code into its own function
Separates the behavior from the actual switch statement and gets rid of
duplication, now that we can use the general GetImmediateAsU64()
function.
2018-10-05 21:06:54 -04:00