Title: [287464] trunk/Source
- Revision
- 287464
- Author
- [email protected]
- Date
- 2021-12-28 00:48:32 -0800 (Tue, 28 Dec 2021)
Log Message
[RISCV64] Define HAVE_MACHINE_CONTEXT, provide mcontext_t accessors for CPU(RISCV64)
https://bugs.webkit.org/show_bug.cgi?id=234718
Patch by Zan Dobersek <[email protected]> on 2021-12-28
Reviewed by Yusuke Suzuki.
Source/_javascript_Core:
Define HAVE_MACHINE_CONTEXT for RISCV64. In the MachineContext.h
header, CPU(RISCV64)-specific accessors into the mcontext_t struct
are also provided.
* runtime/MachineContext.h:
(JSC::MachineContext::stackPointerImpl):
(JSC::MachineContext::framePointerImpl):
(JSC::MachineContext::instructionPointerImpl):
(JSC::MachineContext::argumentPointer<1>):
(JSC::MachineContext::llintInstructionPointer):
Source/WTF:
* wtf/PlatformHave.h: Define HAVE_MACHINE_CONTEXT for CPU(RISCV64).
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (287463 => 287464)
--- trunk/Source/_javascript_Core/ChangeLog 2021-12-28 06:10:30 UTC (rev 287463)
+++ trunk/Source/_javascript_Core/ChangeLog 2021-12-28 08:48:32 UTC (rev 287464)
@@ -1,3 +1,21 @@
+2021-12-28 Zan Dobersek <[email protected]>
+
+ [RISCV64] Define HAVE_MACHINE_CONTEXT, provide mcontext_t accessors for CPU(RISCV64)
+ https://bugs.webkit.org/show_bug.cgi?id=234718
+
+ Reviewed by Yusuke Suzuki.
+
+ Define HAVE_MACHINE_CONTEXT for RISCV64. In the MachineContext.h
+ header, CPU(RISCV64)-specific accessors into the mcontext_t struct
+ are also provided.
+
+ * runtime/MachineContext.h:
+ (JSC::MachineContext::stackPointerImpl):
+ (JSC::MachineContext::framePointerImpl):
+ (JSC::MachineContext::instructionPointerImpl):
+ (JSC::MachineContext::argumentPointer<1>):
+ (JSC::MachineContext::llintInstructionPointer):
+
2021-12-27 Yusuke Suzuki <[email protected]>
Consider merging Wasm::FunctionCodeBlock and Wasm::LLIntCallee
Modified: trunk/Source/_javascript_Core/runtime/MachineContext.h (287463 => 287464)
--- trunk/Source/_javascript_Core/runtime/MachineContext.h 2021-12-28 06:10:30 UTC (rev 287463)
+++ trunk/Source/_javascript_Core/runtime/MachineContext.h 2021-12-28 08:48:32 UTC (rev 287464)
@@ -207,6 +207,8 @@
return reinterpret_cast<void*&>((uintptr_t&) machineContext.sp);
#elif CPU(MIPS)
return reinterpret_cast<void*&>((uintptr_t&) machineContext.gregs[29]);
+#elif CPU(RISCV64)
+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[REG_SP]);
#else
#error Unknown Architecture
#endif
@@ -359,6 +361,8 @@
return reinterpret_cast<void*&>((uintptr_t&) machineContext.regs[29]);
#elif CPU(MIPS)
return reinterpret_cast<void*&>((uintptr_t&) machineContext.gregs[30]);
+#elif CPU(RISCV64)
+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[REG_S0]);
#else
#error Unknown Architecture
#endif
@@ -510,6 +514,8 @@
return reinterpret_cast<void*&>((uintptr_t&) machineContext.pc);
#elif CPU(MIPS)
return reinterpret_cast<void*&>((uintptr_t&) machineContext.pc);
+#elif CPU(RISCV64)
+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[REG_PC]);
#else
#error Unknown Architecture
#endif
@@ -668,6 +674,8 @@
return reinterpret_cast<void*&>((uintptr_t&) machineContext.regs[1]);
#elif CPU(MIPS)
return reinterpret_cast<void*&>((uintptr_t&) machineContext.gregs[5]);
+#elif CPU(RISCV64)
+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[REG_A0 + 1]);
#else
#error Unknown Architecture
#endif
@@ -785,6 +793,8 @@
return reinterpret_cast<void*&>((uintptr_t&) machineContext.regs[4]);
#elif CPU(MIPS)
return reinterpret_cast<void*&>((uintptr_t&) machineContext.gregs[12]);
+#elif CPU(RISCV64)
+ return reinterpret_cast<void*&>((uintptr_t&) machineContext.__gregs[14]);
#else
#error Unknown Architecture
#endif
Modified: trunk/Source/WTF/ChangeLog (287463 => 287464)
--- trunk/Source/WTF/ChangeLog 2021-12-28 06:10:30 UTC (rev 287463)
+++ trunk/Source/WTF/ChangeLog 2021-12-28 08:48:32 UTC (rev 287464)
@@ -1,3 +1,12 @@
+2021-12-28 Zan Dobersek <[email protected]>
+
+ [RISCV64] Define HAVE_MACHINE_CONTEXT, provide mcontext_t accessors for CPU(RISCV64)
+ https://bugs.webkit.org/show_bug.cgi?id=234718
+
+ Reviewed by Yusuke Suzuki.
+
+ * wtf/PlatformHave.h: Define HAVE_MACHINE_CONTEXT for CPU(RISCV64).
+
2021-12-23 Sam Weinig <[email protected]>
Gradient color interpolation incorrect for colors with alpha (need to interpolate premultiplied colors)
Modified: trunk/Source/WTF/wtf/PlatformHave.h (287463 => 287464)
--- trunk/Source/WTF/wtf/PlatformHave.h 2021-12-28 06:10:30 UTC (rev 287463)
+++ trunk/Source/WTF/wtf/PlatformHave.h 2021-12-28 08:48:32 UTC (rev 287464)
@@ -222,7 +222,7 @@
#define HAVE_HOSTED_CORE_ANIMATION 1
#endif
-#if OS(DARWIN) || OS(FUCHSIA) || ((OS(FREEBSD) || OS(OPENBSD) || OS(LINUX)) && (CPU(X86) || CPU(X86_64) || CPU(ARM) || CPU(ARM64) || CPU(MIPS)))
+#if OS(DARWIN) || OS(FUCHSIA) || ((OS(FREEBSD) || OS(OPENBSD) || OS(LINUX)) && (CPU(X86) || CPU(X86_64) || CPU(ARM) || CPU(ARM64) || CPU(MIPS) || CPU(RISCV64)))
#define HAVE_MACHINE_CONTEXT 1
#endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes