Everywhere: Use ARCH(AARCH64) instead of AK_ARCH_AARCH64

The former is typo-resistant after 349e54d5375a4a, so make use of that.
This commit is contained in:
Nico Weber 2023-04-14 10:44:17 -04:00 committed by Linus Groh
parent 50f42407f6
commit 97b7e494e4
Notes: sideshowbarker 2024-07-17 08:37:36 +09:00
7 changed files with 29 additions and 29 deletions

View File

@ -148,7 +148,7 @@
#ifdef NAKED
# undef NAKED
#endif
#ifndef AK_ARCH_AARCH64
#if !ARCH(AARCH64)
# define NAKED __attribute__((naked))
#else
# define NAKED

View File

@ -274,7 +274,7 @@ template<>
struct __MakeUnsigned<bool> {
using Type = bool;
};
#ifdef AK_ARCH_AARCH64
#if ARCH(AARCH64)
template<>
struct __MakeUnsigned<wchar_t> {
using Type = wchar_t;
@ -332,7 +332,7 @@ template<>
struct __MakeSigned<char> {
using Type = char;
};
#ifdef AK_ARCH_AARCH64
#if ARCH(AARCH64)
template<>
struct __MakeSigned<wchar_t> {
using Type = void;

View File

@ -62,7 +62,7 @@ void _entry(int, char**, char**) __attribute__((used));
NAKED void _start(int, char**, char**)
{
#ifdef AK_ARCH_AARCH64
#if ARCH(AARCH64)
asm(
"bl _entry\n");
#else

View File

@ -25,7 +25,7 @@ void _start(int, char**, char**) __attribute__((used));
NAKED void _start(int, char**, char**)
{
# ifdef AK_ARCH_AARCH64
# if ARCH(AARCH64)
asm(
"bl _entry\n");
# else

View File

@ -10,7 +10,7 @@
// This is the size of the floating point environment image in protected mode
static_assert(sizeof(__x87_floating_point_environment) == 28);
#ifndef AK_ARCH_AARCH64
#if !ARCH(AARCH64)
static u16 read_status_register()
{
u16 status_register;
@ -55,7 +55,7 @@ int fegetenv(fenv_t* env)
if (!env)
return 1;
#ifdef AK_ARCH_AARCH64
#if ARCH(AARCH64)
(void)env;
TODO_AARCH64();
#else
@ -73,7 +73,7 @@ int fesetenv(fenv_t const* env)
if (!env)
return 1;
#ifdef AK_ARCH_AARCH64
#if ARCH(AARCH64)
(void)env;
TODO_AARCH64();
#else
@ -99,7 +99,7 @@ int feholdexcept(fenv_t* env)
fenv_t current_env;
fegetenv(&current_env);
#ifdef AK_ARCH_AARCH64
#if ARCH(AARCH64)
(void)env;
TODO_AARCH64();
#else
@ -139,7 +139,7 @@ int fesetexceptflag(fexcept_t const* except, int exceptions)
fegetenv(&current_env);
exceptions &= FE_ALL_EXCEPT;
#ifdef AK_ARCH_AARCH64
#if ARCH(AARCH64)
(void)exceptions;
(void)except;
TODO_AARCH64();
@ -154,7 +154,7 @@ int fesetexceptflag(fexcept_t const* except, int exceptions)
int fegetround()
{
#ifdef AK_ARCH_AARCH64
#if ARCH(AARCH64)
TODO_AARCH64();
#else
// There's no way to signal whether the SSE rounding mode and x87 ones are different, so we assume they're the same
@ -167,7 +167,7 @@ int fesetround(int rounding_mode)
if (rounding_mode < FE_TONEAREST || rounding_mode > FE_TOWARDZERO)
return 1;
#ifdef AK_ARCH_AARCH64
#if ARCH(AARCH64)
TODO_AARCH64();
#else
auto control_word = read_control_word();
@ -196,7 +196,7 @@ int feclearexcept(int exceptions)
fenv_t current_env;
fegetenv(&current_env);
#ifdef AK_ARCH_AARCH64
#if ARCH(AARCH64)
(void)exceptions;
TODO_AARCH64();
#else
@ -210,7 +210,7 @@ int feclearexcept(int exceptions)
int fetestexcept(int exceptions)
{
#ifdef AK_ARCH_AARCH64
#if ARCH(AARCH64)
(void)exceptions;
TODO_AARCH64();
#else
@ -228,7 +228,7 @@ int feraiseexcept(int exceptions)
exceptions &= FE_ALL_EXCEPT;
#ifdef AK_ARCH_AARCH64
#if ARCH(AARCH64)
(void)exceptions;
TODO_AARCH64();
#else

View File

@ -10,7 +10,7 @@
#include <AK/BuiltinWrappers.h>
#include <AK/ExtraMathConstants.h>
#include <AK/FloatingPoint.h>
#ifndef AK_ARCH_AARCH64
#if !ARCH(AARCH64)
# include <AK/FPControl.h>
#endif
#include <AK/Math.h>
@ -364,7 +364,7 @@ MAKE_AK_BACKED2(remainder);
long double truncl(long double x) NOEXCEPT
{
#ifndef AK_ARCH_AARCH64
#if !ARCH(AARCH64)
if (fabsl(x) < LONG_LONG_MAX) {
// This is 1.6 times faster than the implementation using the "internal_to_integer"
// helper (on x86_64)
@ -384,7 +384,7 @@ long double truncl(long double x) NOEXCEPT
double trunc(double x) NOEXCEPT
{
#ifndef AK_ARCH_AARCH64
#if !ARCH(AARCH64)
if (fabs(x) < LONG_LONG_MAX) {
u64 temp;
asm(
@ -401,7 +401,7 @@ double trunc(double x) NOEXCEPT
float truncf(float x) NOEXCEPT
{
#ifndef AK_ARCH_AARCH64
#if !ARCH(AARCH64)
if (fabsf(x) < LONG_LONG_MAX) {
u64 temp;
asm(
@ -418,7 +418,7 @@ float truncf(float x) NOEXCEPT
long double rintl(long double value)
{
#ifdef AK_ARCH_AARCH64
#if ARCH(AARCH64)
(void)value;
TODO_AARCH64();
#else
@ -432,7 +432,7 @@ long double rintl(long double value)
}
double rint(double value)
{
#ifdef AK_ARCH_AARCH64
#if ARCH(AARCH64)
(void)value;
TODO_AARCH64();
#else
@ -446,7 +446,7 @@ double rint(double value)
}
float rintf(float value)
{
#ifdef AK_ARCH_AARCH64
#if ARCH(AARCH64)
(void)value;
TODO_AARCH64();
#else
@ -461,7 +461,7 @@ float rintf(float value)
long lrintl(long double value)
{
#ifdef AK_ARCH_AARCH64
#if ARCH(AARCH64)
(void)value;
TODO_AARCH64();
#else
@ -476,7 +476,7 @@ long lrintl(long double value)
}
long lrint(double value)
{
#ifdef AK_ARCH_AARCH64
#if ARCH(AARCH64)
(void)value;
TODO_AARCH64();
#else
@ -491,7 +491,7 @@ long lrint(double value)
}
long lrintf(float value)
{
#ifdef AK_ARCH_AARCH64
#if ARCH(AARCH64)
(void)value;
TODO_AARCH64();
#else
@ -507,7 +507,7 @@ long lrintf(float value)
long long llrintl(long double value)
{
#ifdef AK_ARCH_AARCH64
#if ARCH(AARCH64)
(void)value;
TODO_AARCH64();
#else
@ -522,7 +522,7 @@ long long llrintl(long double value)
}
long long llrint(double value)
{
#ifdef AK_ARCH_AARCH64
#if ARCH(AARCH64)
(void)value;
TODO_AARCH64();
#else
@ -537,7 +537,7 @@ long long llrint(double value)
}
long long llrintf(float value)
{
#ifdef AK_ARCH_AARCH64
#if ARCH(AARCH64)
(void)value;
TODO_AARCH64();
#else

View File

@ -684,7 +684,7 @@ void ELF::DynamicLinker::linker_main(DeprecatedString&& main_program_path, int m
dbgln_if(DYNAMIC_LOAD_DEBUG, "Jumping to entry point: {:p}", entry_point_function);
if (s_do_breakpoint_trap_before_entry) {
#ifdef AK_ARCH_AARCH64
#if ARCH(AARCH64)
asm("brk #0");
#else
asm("int3");