Line 0
Link Here
|
|
|
1 |
diff --git a/CMakeLists.txt b/CMakeLists.txt |
2 |
index 7e6c6e989..6c4fed042 100644 |
3 |
--- a/CMakeLists.txt |
4 |
+++ b/CMakeLists.txt |
5 |
@@ -90,6 +90,8 @@ elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "s390x") |
6 |
set(WTF_CPU_S390X 1) |
7 |
elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "riscv64") |
8 |
set(WTF_CPU_RISCV64 1) |
9 |
+elseif (LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "loongarch64") |
10 |
+ set(WTF_CPU_LOONGARCH64 1) |
11 |
else () |
12 |
message(FATAL_ERROR "Unknown CPU '${LOWERCASE_CMAKE_SYSTEM_PROCESSOR}'") |
13 |
endif () |
14 |
diff --git a/Source/JavaScriptCore/CMakeLists.txt b/Source/JavaScriptCore/CMakeLists.txt |
15 |
index 83b0f399c..a439444ef 100644 |
16 |
--- a/Source/JavaScriptCore/CMakeLists.txt |
17 |
+++ b/Source/JavaScriptCore/CMakeLists.txt |
18 |
@@ -1280,6 +1280,7 @@ if (WTF_CPU_ARM) |
19 |
elseif (WTF_CPU_ARM64) |
20 |
elseif (WTF_CPU_ALPHA) |
21 |
elseif (WTF_CPU_HPPA) |
22 |
+elseif (WTF_CPU_LOONGARCH64) |
23 |
elseif (WTF_CPU_PPC) |
24 |
elseif (WTF_CPU_PPC64) |
25 |
elseif (WTF_CPU_PPC64LE) |
26 |
diff --git a/Source/ThirdParty/ANGLE/src/common/mathutil.h b/Source/ThirdParty/ANGLE/src/common/mathutil.h |
27 |
index 7959da8bd..c86afd61e 100644 |
28 |
--- a/Source/ThirdParty/ANGLE/src/common/mathutil.h |
29 |
+++ b/Source/ThirdParty/ANGLE/src/common/mathutil.h |
30 |
@@ -16,6 +16,7 @@ |
31 |
#include <algorithm> |
32 |
#include <string.h> |
33 |
#include <stdlib.h> |
34 |
+#include <cstdint> |
35 |
|
36 |
namespace gl |
37 |
{ |
38 |
diff --git a/Source/ThirdParty/brotli/dec/port.h b/Source/ThirdParty/brotli/dec/port.h |
39 |
index 54f51b010..e6da12d35 100644 |
40 |
--- a/Source/ThirdParty/brotli/dec/port.h |
41 |
+++ b/Source/ThirdParty/brotli/dec/port.h |
42 |
@@ -60,6 +60,10 @@ |
43 |
#define BROTLI_TARGET_RISCV64 |
44 |
#endif |
45 |
|
46 |
+#if defined(__loongarch64) |
47 |
+#define BROTLI_TARGET_LOONGARCH64 |
48 |
+#endif |
49 |
+ |
50 |
#ifdef BROTLI_BUILD_PORTABLE |
51 |
#define BROTLI_ALIGNED_READ (!!1) |
52 |
#elif defined(BROTLI_TARGET_X86) || defined(BROTLI_TARGET_X64) || \ |
53 |
@@ -100,6 +104,7 @@ static BROTLI_INLINE void BrotliDump(const char* f, int l, const char* fn) { |
54 |
#elif defined(BROTLI_BUILD_32_BIT) |
55 |
#define BROTLI_64_BITS 0 |
56 |
#elif defined(BROTLI_TARGET_X64) || defined(BROTLI_TARGET_ARMV8) || \ |
57 |
+ defined(BROTLI_TARGET_LOONGARCH64) || \ |
58 |
defined(BROTLI_TARGET_POWERPC64) || defined(BROTLI_TARGET_RISCV64) |
59 |
#define BROTLI_64_BITS 1 |
60 |
#else |
61 |
diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h |
62 |
index 7aefa1bab..224bd5ac7 100644 |
63 |
--- a/Source/WTF/wtf/Platform.h |
64 |
+++ b/Source/WTF/wtf/Platform.h |
65 |
@@ -176,6 +176,11 @@ |
66 |
#define WTF_CPU_X86_SSE2 1 |
67 |
#endif |
68 |
|
69 |
+/* CPU(LOONGARCH64) - LoongArch */ |
70 |
+#if defined(__loongarch64) |
71 |
+#define WTF_CPU_LOONGARCH64 1 |
72 |
+#endif |
73 |
+ |
74 |
/* CPU(RISCV64) - RISCV64 */ |
75 |
#if defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 64 |
76 |
#define WTF_CPU_RISCV64 1 |
77 |
@@ -710,6 +715,7 @@ |
78 |
|| CPU(ALPHA) \ |
79 |
|| CPU(ARM64) \ |
80 |
|| CPU(S390X) \ |
81 |
+ || CPU(LOONGARCH64) \ |
82 |
|| CPU(MIPS64) \ |
83 |
|| CPU(PPC64) \ |
84 |
|| CPU(PPC64LE) \ |
85 |
diff --git a/Source/WTF/wtf/dtoa/utils.h b/Source/WTF/wtf/dtoa/utils.h |
86 |
index 176d5909f..b13616295 100644 |
87 |
--- a/Source/WTF/wtf/dtoa/utils.h |
88 |
+++ b/Source/WTF/wtf/dtoa/utils.h |
89 |
@@ -49,7 +49,7 @@ |
90 |
defined(__ARMEL__) || \ |
91 |
defined(_MIPS_ARCH_MIPS32R2) |
92 |
#define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 |
93 |
-#elif CPU(MIPS) || CPU(MIPS64) || CPU(PPC) || CPU(PPC64) || CPU(PPC64LE) || CPU(SH4) || CPU(S390) || CPU(S390X) || CPU(IA64) || CPU(ALPHA) || CPU(ARM64) || CPU(HPPA) || CPU(RISCV64) |
94 |
+#elif CPU(MIPS) || CPU(MIPS64) || CPU(PPC) || CPU(PPC64) || CPU(PPC64LE) || CPU(SH4) || CPU(S390) || CPU(S390X) || CPU(IA64) || CPU(ALPHA) || CPU(ARM64) || CPU(HPPA) || CPU(LOONGARCH64) || CPU(RISCV64) |
95 |
#define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 |
96 |
#elif defined(_M_IX86) || defined(__i386__) |
97 |
#if defined(_WIN32) |
98 |
diff --git a/Tools/Scripts/webkitdirs.pm b/Tools/Scripts/webkitdirs.pm |
99 |
index 4a075d41c..5932fed69 100755 |
100 |
--- a/Tools/Scripts/webkitdirs.pm |
101 |
+++ b/Tools/Scripts/webkitdirs.pm |
102 |
@@ -1264,6 +1264,11 @@ sub isARM() |
103 |
return ($Config{archname} =~ /^arm[v\-]/) || ($Config{archname} =~ /^aarch64[v\-]/); |
104 |
} |
105 |
|
106 |
+sub isLOONGARCH() |
107 |
+{ |
108 |
+ return ($Config{archname} =~ /^loongarch64\-/); |
109 |
+} |
110 |
+ |
111 |
sub isRISCV() |
112 |
{ |
113 |
return ($Config{archname} =~ /^riscv(|32|64)\-/); |