1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:28:12 +00:00

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
7 changed files with 29 additions and 29 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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