Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:michals
ladybird
LibJS-ppc64le.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File LibJS-ppc64le.patch of Package ladybird
From 5b9cc9250dde62a199050acbc1f4e306871f59db Mon Sep 17 00:00:00 2001 From: Michal Suchanek <msuchanek@suse.de> Date: Fri, 22 Dec 2023 14:33:06 +0100 Subject: [PATCH] ppc64le: Add in ARCH macro, LibJS Value.h, and LibWeb ResourceLoader.h With this Ladybird can be built on ppc64le Fixes: #22338 --- AK/Platform.h | 12 ++++++++++++ Userland/Libraries/LibJS/Runtime/Value.h | 2 +- Userland/Libraries/LibWeb/Loader/UserAgent.h | 2 ++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/AK/Platform.h b/AK/Platform.h index 0dfda3df4d..c08f5f2ad2 100644 --- a/AK/Platform.h +++ b/AK/Platform.h @@ -33,6 +33,12 @@ # define AK_IS_ARCH_AARCH64() 0 #endif +#if defined(__powerpc64__) && defined(__LITTLE_ENDIAN__) +# define AK_IS_ARCH_PPC64LE() 1 +#else +# define AK_IS_ARCH_PPC64LE() 0 +#endif + #if defined(__riscv) && __riscv_xlen == 64 # define AK_IS_ARCH_RISCV64() 1 #else @@ -145,6 +151,12 @@ # define VALIDATE_IS_AARCH64() static_assert(false, "Trying to include aarch64 only header on non aarch64 platform"); #endif +#if ARCH(PPC64LE) +# define VALIDATE_IS_PPC64LE() +#else +# define VALIDATE_IS_PPC64LE() static_assert(false, "Trying to include ppc64le only header on non ppc64le platform"); +#endif + #if ARCH(RISCV64) # define VALIDATE_IS_RISCV64() #else diff --git a/Userland/Libraries/LibJS/Runtime/Value.h b/Userland/Libraries/LibJS/Runtime/Value.h index 18a4a375fe..5c0fa5766a 100644 --- a/Userland/Libraries/LibJS/Runtime/Value.h +++ b/Userland/Libraries/LibJS/Runtime/Value.h @@ -431,7 +431,7 @@ public: // For 32-bit system the pointer fully fits so we can just return it directly. static_assert(sizeof(void*) == sizeof(u32)); return static_cast<FlatPtr>(encoded & 0xffff'ffff); -#elif ARCH(X86_64) || ARCH(RISCV64) +#elif ARCH(X86_64) || ARCH(RISCV64) || ARCH(PPC64LE) // For x86_64 and riscv64 the top 16 bits should be sign extending the "real" top bit (47th). // So first shift the top 16 bits away then using the right shift it sign extends the top 16 bits. return static_cast<FlatPtr>((static_cast<i64>(encoded << 16)) >> 16); diff --git a/Userland/Libraries/LibWeb/Loader/UserAgent.h b/Userland/Libraries/LibWeb/Loader/UserAgent.h index 07670eda24..0883ce1911 100644 --- a/Userland/Libraries/LibWeb/Loader/UserAgent.h +++ b/Userland/Libraries/LibWeb/Loader/UserAgent.h @@ -17,6 +17,8 @@ namespace Web { # define CPU_STRING "AArch64" #elif ARCH(I386) # define CPU_STRING "x86" +#elif ARCH(PPC64LE) +# define CPU_STRING "Power" #elif ARCH(RISCV64) # define CPU_STRING "RISC-V 64" #else -- 2.45.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor