summaryrefslogtreecommitdiff
path: root/Source/Core/Common/Arm64Emitter.cpp
AgeCommit message (Collapse)Author
2021-05-15JitArm64: Implement fresJosJuice
2021-05-13Arm64Emitter: Implement more variants of FMOVJosJuice
2021-04-25JitArm64: Optimize ConvertSingleToDouble, part 2JosJuice
If we can prove that FCVT will provide a correct conversion, we can use FCVT. This makes the common case a bit faster and the less likely cases (unfortunately including zero, which FCVT actually can convert correctly) a bit slower.
2021-03-17Merge pull request #9494 from Dentomologist/convert_arm64reg_to_enum_classJosJuice
Arm64Gen: Convert ARM64Reg to enum class
2021-03-13Arm64Gen: Convert ARM64Reg to enum classDentomologist
Most changes are just adding ARM64Reg:: in front of the constants.
2021-03-07Arm64Gen: Move constant and make constexprDentomologist
Namespace-scope variable was only used in one function so move it there
2021-03-07Arm64Gen: Remove unused constantDentomologist
2021-02-15JitArm64: Workaround for GCC ICEJosJuice
2021-02-13Arm64Emitter: Use ORR in MOVI2RJosJuice
2021-02-13Arm64Emitter: Improve MOVI2RJosJuice
More or less a complete rewrite of the function which aims to be equally good or better for each given input, without relying on special cases like the old implementation did. In particular, we now have more extensive support for MOVN, as mentioned in a TODO comment.
2021-02-13Arm64Emitter: Allow specifying 21th bit of ADRP immJosJuice
2021-02-13Arm64Emitter: Remove optimize parameter from MOVI2RJosJuice
I don't really see the use of this. (Maybe in the past it was used for when we need a constant number of instructions for backpatching? But we don't use MOVI2R for that now.)
2021-01-31Arm64Emitter: Add additional assertions to BFI/UBFIZMerryMage
2021-01-31Arm64Emitter: Prefer BFM/UBFM to EncodeBitfieldMOVInstMerryMage
2021-01-31Arm64Emitter: Add BFXILMerryMage
2021-01-30Arm64Emitter: Add asserts for LDP/STP imm out of rangeJosJuice
2021-01-17Arm64Emitter: Convert ShiftType to enum classDentomologist
2021-01-15Arm64Emitter: Convert IndexType to enum classDentomologist
2021-01-01Arm64Emitter: Convert ArithOption enums into enum classesLioncash
Makes the enums strongly typed. While we're at it, we can also make these enums private.
2020-12-30Arm64Emitter: Add shorthand member functions for hint instructionsLioncash
Allows for more concise code.
2020-12-30Arm64Emitter: Make ShiftAmount enum an enum classLioncash
Reduces namespace pollution and makes the enum strongly typed.
2020-12-30Arm64Emitter: Make RoundingMode enum an enum classLioncash
Prevents namespace pollution and makes the enum members strongly typed.
2020-12-30Arm64Emitter: Make PStateField enum an enum classLioncash
Prevents namespace pollution and makes the enum members strongly typed.
2020-12-30Arm64Emitter: Make BarrierType enum an enum classLioncash
Prevents namespace pollution and enforces strong typing.
2020-12-30Arm64Emitter: Make SystemHint enum an enum classLioncash
Avoids polluting the namespace and makes the members strongly typed.
2020-12-30Arm64Emitter: Make type member of FixupBranch an enum classLioncash
Eliminates some magic numbers and makes the type member strongly typed.
2020-12-30Arm64Emitter: Annotate switch fallthroughLioncash
Silences warnings and makes intent explicit.
2020-12-30Arm64Emitter: Make use of std::optionalLioncash
Allows eliminating some out variables in favor of optional, which allows narrowing visible scope of variables.
2020-12-27BitUtils: Add CountLeadingZerosMerryMage
2020-10-23Common: Migrate logging to fmtLioncash
Continues the migration of our code over to the fmt logger.
2020-08-24x64Emitter: Check end of allocated space when emitting code.Admiral H. Curtiss
2020-02-12CMake: Fix building ARM64 on Windowsspycrab
2019-12-28Compile fixes for Windows-on-ARM64Stenzek
2019-11-11Fix typo in commentMarshall Mohror
2019-05-06Reformat repo to clang-format 7.0 rulesTechjar
2018-08-30Arm64Emitter: Remove unsequenced expressionsMerryMage
Incrementing `it` twice between sequence points is undefined behavior.
2018-08-27Arm64Emitter: Make the Align* functions return a non-const data pointerLioncash
Similar in nature to e28d06353947f65fa8218871d5a488f583ec69ab in which this same change was applied to the x64 emitter. There's no real requirement to make this const, and this should also be decided by the calling code, considering we had places that would simply cast away the const and carry on
2018-08-14Arm64Emitter: Get rid of a pointer cast within SetJumpTarget()Lioncash
Type punning like this is undefined behavior. Instead, we use std::memcpy to copy the necessary data over, which is well defined (as it treats both the source and destination as unsigned char).
2018-05-29Arm64Emitter: Use Common::BitCast where applicableLioncash
Gets rid of the need to set up memcpy boilerplate to reinterpret between floating-point and integers. While we're at it, also do a minor bit of tidying.
2018-04-12Reformat all the things!spycrab
2018-03-23Arm64Emitter: Satisfy unrelated linter issues that cropped up by modifying ↵Lioncash
the cpp file
2018-03-23Arm64Emitter: Make IsImmArithmetic, IsImmLogical, FPImm8ToFloat, and ↵Lioncash
FPImm8FromFloat internally linked These aren't used anywhere outside of the emitter. Centralizes them under an anonymous namespace.
2018-03-23Arm64Emitter: Remove unnecessary V8_UINT64_C preprocessor macroLioncash
UINT64_C is provided via <cstdint>, so we can just use that instead.
2018-03-23Arm64Emitter: Remove duplicate IsPowerOf2 functionLioncash
We can just use the generified version in MathUtil.
2018-03-16Use __func__ instead of __FUNCTION__ where applicableLioncash
This replaces usages of the non-standard __FUNCTION__ macro with the standard mandated __func__ identifier. __FUNCTION__ is a preprocessor definition that is provided as an extension by compilers. This was the only convenient option to rely on pre-C++11. However, C++11 and greater mandate the predefined identifier __func__, which lets us accomplish the same thing. The difference between the two, however, is that __func__ isn't a preprocessor macro, it's an actual identifier that exists at function scope. The C++17 draft standard (N4659) at section [dcl.fct.def.general] paragraph 8 states: " The function-local predefined variable __func__ is defined as if a definition of the form static const char __func__[] = "function-name "; had been provided, where function-name is an implementation-defined string. It is unspecified whether such a variable has an address distinct from that of any other object in the program. " Thankfully, we don't do any macro or string concatenation with __FUNCTION__ that can't be modified to use __func__.
2018-03-16Assert: Remove unused parameter from DEBUG_ASSERTLioncash
This brings the macro in line with the regular ASSERT macro, which only has one macro parameter.
2018-03-14Assert: Uppercase assertion macrosLioncash
Macros should be all upper-cased. This is also kind of a wart that's been sticking out for quite a while now (we avoid prefixing underscores).
2017-12-09Fix arm64 MOVI2R for addresses between 2gb and 4gb offset from PCJonathan Hamilton
The PC offset ADRP() path takes a s32 value, but the input offset was being tested as abs(ptr) < 0xFFFFFFFF. This caused values between 0x80000000 and 0xFFFFFFFF to incorrectly use this path, despite the offsets not being representable in an s32. This caused a crash in the VertexLoader on android 8.1 immediate in wind waker (and possibly all other apps on android 8.1) as the jit and data sections happened to be loaded 4gb apart in virtual memory, causing some pointers to hit this
2017-09-02JitArm64: Reimplement aarch64 cycle counters.degasus
CNTVCT_EL0 is force-enabled on all linux plattforms. Windows is untested, but as this is the best way to get *any* low overhead performance counters, they likely use it as well.
2017-08-22JitArm64: Fix rlwinmx.degasus
Seems like I was wrong that ANDI2R doesn't require a temporary register here. There is *one* case when the mask won't fit in the ARM AND instruction: mask = 0xFFFFFFFF But let's just use MOV instead of AND here for this case...