mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
AK: Add riscv64 support
This commit is contained in:
parent
3c176bafee
commit
d572ad38ac
Notes:
sideshowbarker
2024-07-17 06:40:21 +09:00
Author: https://github.com/spholz Commit: https://github.com/SerenityOS/serenity/commit/d572ad38ac Pull-request: https://github.com/SerenityOS/serenity/pull/20689 Reviewed-by: https://github.com/ADKaster ✅
2 changed files with 13 additions and 0 deletions
|
@ -25,4 +25,5 @@ extern "C" __attribute__((noreturn)) void ak_verification_failed(char const*);
|
|||
static constexpr bool TODO = false;
|
||||
# define TODO() VERIFY(TODO) /* NOLINT(cert-dcl03-c,misc-static-assert) No, this can't be static_assert, it's a runtime check */
|
||||
# define TODO_AARCH64() VERIFY(TODO) /* NOLINT(cert-dcl03-c,misc-static-assert) No, this can't be static_assert, it's a runtime check */
|
||||
# define TODO_RISCV64() VERIFY(TODO) /* NOLINT(cert-dcl03-c,misc-static-assert) No, this can't be static_assert, it's a runtime check */
|
||||
#endif
|
||||
|
|
|
@ -23,6 +23,12 @@
|
|||
# define AK_IS_ARCH_AARCH64() 0
|
||||
#endif
|
||||
|
||||
#if defined(__riscv) && __riscv_xlen == 64
|
||||
# define AK_IS_ARCH_RISCV64() 1
|
||||
#else
|
||||
# define AK_IS_ARCH_RISCV64() 0
|
||||
#endif
|
||||
|
||||
#ifdef __wasm32__
|
||||
# define AK_IS_ARCH_WASM32() 1
|
||||
#else
|
||||
|
@ -113,6 +119,12 @@
|
|||
# define VALIDATE_IS_AARCH64() static_assert(false, "Trying to include aarch64 only header on non aarch64 platform");
|
||||
#endif
|
||||
|
||||
#if ARCH(RISCV64)
|
||||
# define VALIDATE_IS_RISCV64()
|
||||
#else
|
||||
# define VALIDATE_IS_RISCV64() static_assert(false, "Trying to include riscv64 only header on non riscv64 platform");
|
||||
#endif
|
||||
|
||||
#if !defined(AK_COMPILER_CLANG)
|
||||
# define AK_HAS_CONDITIONALLY_TRIVIAL
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue