summaryrefslogtreecommitdiffstats
path: root/libs/wpewebkit/patches/315-javascriptcore-riscv64-testfinalize-handle-carry.patch
blob: 73412fd205422c5dc83264d5db72f52252022689 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
From 15c550e283e3d170585fc7d36cbc3a771fe3d61e Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
Date: Wed, 23 Sep 2026 14:33:27 +0100
Subject: [PATCH] JavaScriptCore: handle Carry in RISCV64 testFinalize switch

https://bugs.webkit.org/show_bug.cgi?id=315509

Reviewed by NOBODY (OOPS!).

testFinalize() switches on ResultCondition but does not list the Carry
case, which makes every translation unit that includes
MacroAssemblerRISCV64.h emit:

  warning: enumeration value 'Carry' not handled in switch [-Wswitch]

The Carry condition cannot be produced by RISC-V test operations (the
ResultCondition enum declaration already comments it "<- not
implemented"), and the sibling switch elsewhere in this file already
groups Carry with Overflow/Signed/PositiveOrZero under
RELEASE_ASSERT_NOT_REACHED(). Add the missing case so testFinalize
matches that convention and the warning disappears.

* Source/JavaScriptCore/assembler/MacroAssemblerRISCV64.h:
(JSC::MacroAssemblerRISCV64::testFinalize):
---
 Source/JavaScriptCore/assembler/MacroAssemblerRISCV64.h | 1 +
 1 file changed, 1 insertion(+)

--- a/Source/JavaScriptCore/assembler/MacroAssemblerRISCV64.h
+++ b/Source/JavaScriptCore/assembler/MacroAssemblerRISCV64.h
@@ -4770,6 +4770,7 @@ private:
     void testFinalize(ResultCondition cond, RegisterID src, RegisterID dest)
     {
         switch (cond) {
+        case Carry:
         case Overflow:
         case Signed:
         case PositiveOrZero: