| Age | Commit message (Collapse) | Author |
|
|
|
|
|
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.
|
|
Arm64Gen: Convert ARM64Reg to enum class
|
|
Most changes are just adding ARM64Reg:: in front of the constants.
|
|
Namespace-scope variable was only used in one function so move it there
|
|
|
|
|
|
|
|
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.
|
|
|
|
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.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Makes the enums strongly typed. While we're at it, we can also make
these enums private.
|
|
Allows for more concise code.
|
|
Reduces namespace pollution and makes the enum strongly typed.
|
|
Prevents namespace pollution and makes the enum members strongly typed.
|
|
Prevents namespace pollution and makes the enum members strongly typed.
|
|
Prevents namespace pollution and enforces strong typing.
|
|
Avoids polluting the namespace and makes the members strongly typed.
|
|
Eliminates some magic numbers and makes the type member strongly typed.
|
|
Silences warnings and makes intent explicit.
|
|
Allows eliminating some out variables in favor of optional, which allows
narrowing visible scope of variables.
|
|
|
|
Continues the migration of our code over to the fmt logger.
|
|
|
|
|
|
|
|
|
|
|
|
Incrementing `it` twice between sequence points is undefined behavior.
|
|
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
|
|
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).
|
|
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.
|
|
|
|
the cpp file
|
|
FPImm8FromFloat internally linked
These aren't used anywhere outside of the emitter. Centralizes them under an anonymous namespace.
|
|
UINT64_C is provided via <cstdint>, so we can just use that instead.
|
|
We can just use the generified version in MathUtil.
|
|
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__.
|
|
This brings the macro in line with the regular ASSERT macro, which only has one
macro parameter.
|
|
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).
|
|
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
|
|
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.
|
|
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...
|