Commit graph

662 commits

Author SHA1 Message Date
MerryMage
3caf31d19c skyeye: Fix MSVC conversion warnings 2016-08-25 17:43:59 +01:00
MerryMage
ec4c91a92b skyeye: Disable MSVC warning C4200 2016-08-25 17:38:17 +01:00
MerryMage
1f329b2fbf CMakeLists: /DNOMINMAX for MSVC 2016-08-25 17:37:35 +01:00
MerryMage
30df51c2dc ir_emitter: Should be in the IR namespace, not the Arm namespace 2016-08-25 17:36:42 +01:00
MerryMage
922d1fd198 Merge branch 'xbyak' 2016-08-25 16:54:48 +01:00
MerryMage
d04b9eaa81 backend_x64/block_of_code: Reset labels when ClearCache() is called 2016-08-25 16:18:18 +01:00
MerryMage
e32812cd00 Port x64 backend to xbyak 2016-08-25 16:18:17 +01:00
MerryMage
611cffb612 externals: Add xbyak 2016-08-25 16:17:27 +01:00
Lioncash
0e12fb6a56 basic_block: Move all variables behind a public interface 2016-08-25 16:14:37 +01:00
Lioncash
1d8432487d arm_types: Provide the not-equals operator overload for LocationDescriptor
Generally if == has an overload, != should be provided for symmetry.
2016-08-25 14:08:16 +01:00
MerryMage
13908c5a58 reg_alloc: Insert braces around DEBUG_ASSERT
DEBUG_ASSERT becomes an empty statement in release-mode; an if statement
with an empty statement produces a compiler warning.
2016-08-25 13:09:18 +01:00
MerryMage
dc26afbd7e translate_arm: Translate more than one conditional instruction in a block 2016-08-25 13:05:33 +01:00
MerryMage
aa9b63bac4 basic_block: DumpBlock now dumps terminal details 2016-08-25 13:01:32 +01:00
MerryMage
7d181f46ce fuzz_arm: Print more than one IR basic block on failure 2016-08-25 13:00:46 +01:00
Lioncash
1395baefa9 interface: Return register files by const reference
Prevents unnecessary copies where they aren't particularly required.
2016-08-25 12:51:41 +01:00
Lioncash
37755cbfec translate: Simplify function pointer calls
They can just be called like regular functions
2016-08-24 23:19:50 +01:00
Lioncash
9b874c2e23 CMakeLists: Add FPSCR.h to the list of headers
Whoops, that one's on me
2016-08-24 23:19:49 +01:00
MerryMage
22cca5ff72 emit_x64: Actually advance RSB pointer 2016-08-24 23:19:47 +01:00
Lioncash
eba3a06d80 frontend: Introduce FPSCR register helper class
Encapsulates all of the FPSCR state.
2016-08-24 20:51:14 +01:00
MerryMage
b5a86889cd Implement VCVT 2016-08-23 22:20:04 +01:00
MerryMage
445aad0639 x64/emitter: Add opBits argument to CVTSI2SS and CVTSI2SD 2016-08-23 21:58:34 +01:00
MerryMage
78464a8f01 translate_arm/vfp2: Implement VSTM (A1, A2) 2016-08-23 20:54:38 +01:00
MerryMage
a96704eb0f arm_types: new_reg >= 0 is always true since new_reg is unsigned 2016-08-23 20:11:41 +01:00
MerryMage
7a01dba3c4 arm_types: Change type signature of operator+ to size_t instead of int 2016-08-23 20:07:53 +01:00
MerryMage
af9a68f0d1 translate_arm/vfp2: Implement VLDM (A1, A2) 2016-08-23 20:07:06 +01:00
Lioncash
d5805cc6eb intrusive_list: Add size querying
Since we store pointers and have an interface for iterators
set up, the count is just the distance from the beginning
to the end of the list.

Nice thing is that because of this, basic blocks also get
the ability to have a size count without needing to do anything
directly.
2016-08-23 19:52:09 +01:00
Lioncash
2180a4be7a basic_block: Use a range-based for loop for iteration 2016-08-23 19:51:01 +01:00
Lioncash
897b776250 string_util: Use C++ attribute specifier for format strings
This is also compatible with both clang and GCC
2016-08-23 19:38:48 +01:00
Lioncash
867d345fdc disassembler: Deduplicate SignStr
Also just makes it return a character, rather than a pointer to a
string.
2016-08-23 16:40:33 +01:00
Lioncash
8bed891011 x64 emitter: Fix swapped parameter names 2016-08-23 16:39:38 +01:00
MerryMage
c8b2f63c93 get_set_elimination_pass: Eliminate unnecessary gets/sets of extended registers 2016-08-23 15:57:20 +01:00
MerryMage
e0f9dead5d microinstruction: Identity's type depends on the type of its argument 2016-08-23 15:48:30 +01:00
Lioncash
67706c208b assert: Use false in asserts rather than 0
Quiets extended warnings.
2016-08-23 14:31:54 +01:00
MerryMage
8c7a81a308 VPOP and VPUSH are floating-point load-store instructions 2016-08-23 14:26:50 +01:00
MerryMage
34cffa86a4 dead_code_elimination_pass: Update to use IR::Inst::MayHaveSideEffects 2016-08-23 13:12:14 +01:00
Lioncash
46573eb538 intrusive_list: Add insert_before() and insert_after() helper functions
Small helpers for inserting nodes before and after an existing one.
insert() is the same as insert_before(), so insert() is just made
to be an alias of this.
2016-08-23 12:38:57 +01:00
MerryMage
8d1b9f32ca Standardize indentation of switch statments 2016-08-23 12:19:27 +01:00
MerryMage
2471be317e arm_types: Implement LocationDescription::FPSCR_RMode 2016-08-23 02:22:04 +01:00
Lioncash
0ebad78432 CMakeLists: Warn when casting away cv-qualifiers from pointers
Warns whenever this type of casting isn't done via const_cast.
2016-08-22 23:24:02 +01:00
Lioncash
47f285249b microinstruction: Introduce convenience informational functions
Whenever more rigorous optimizations are attempted (or even basic ones),
it's usually helpful to know what overall kind of instruction is being
dealt with, in the event certain classes of instructions may be eligible
for optimization.
2016-08-22 21:36:48 +01:00
Lioncash
06ec4b5977 microinstruction: Make constructor explicit 2016-08-22 16:01:18 +01:00
Lioncash
fd5362e968 CMakeLists: Invert if statement
Same thing, less wordy.
2016-08-22 15:55:39 +01:00
Lioncash
723ce801c6 CMakeLists: Warn on deprecated API usages 2016-08-22 15:55:39 +01:00
Lioncash
1bedd3bd7f CMakeLists: Clean up
Moves functions out of the main CMakeLists file into module files that
can just be included whenever necessary. This also uses the CMake
provided variables for enforcing compiler requirements.
2016-08-22 15:55:39 +01:00
MerryMage
74246cc3bf tests/fuzz_arm: Randomize rounding mode in initial_fpscr 2016-08-22 15:54:22 +01:00
MerryMage
f014f3b7d4 tests/fuzz_arm: Update FPSCR in InterpreterFallback 2016-08-22 15:54:21 +01:00
MerryMage
72250b119f backend_x64/block_of_code: Add more floating point constants
* MFloatPositiveZero32
* MFloatPositiveZero64
* MFloatMinS32
* MFloatMaxS32
* MFloatMinU32
* MFloatMaxU32
2016-08-22 15:54:19 +01:00
MerryMage
a32689c832 x64/emitter: Implement CMPxxSD instructions 2016-08-22 15:54:18 +01:00
MerryMage
7a8dd9532d skyeye: Read-after-write in SMLA
In the case when RD === RN, RD was updated before AddOverflow was called
to check for an overflow, resulting in an incorrect state of the Q flag.

This is reapplying a patch from f12578b9ab
that was lost during the 20e253ece2 update
2016-08-22 15:54:17 +01:00
MerryMage
843d29b5a9 translate_arm/branch: Read-after-write in arm_BLX_reg
When BLX LR is translated, BXWritePC(GetRegister(Reg::LR)) was executed
after the SetRegister(Reg::LR, _) update was done.
2016-08-22 15:53:56 +01:00