summaryrefslogtreecommitdiffstats
path: root/libs/wpewebkit/patches/138-JavaScriptCore-IPInt64-asm-RISCV64-port.patch
blob: ad6eb751b93aab576dc77e13dcd4ef386b264928 (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
From d52c544b6421ac02bddf0c1896aaa3f71ab7ddce 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: port the IPInt 64-bit asm to RISCV64

InPlaceInterpreter64.asm restricts the dispatch-table base constants and
the argumINT dispatch to ARM64 and X86_64, and its atomic op macros raise
an offlineasm "error" on any other architecture, which aborts the build
rather than producing a runtime trap.

Add RISCV64 to the two pcrtoaddr-based dispatch sites, and turn the
unsupported-architecture "error" into "break" in the atomic macros so the
file assembles. The RISCV64 implementations of those atomics are supplied
separately.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
 .../llint/InPlaceInterpreter64.asm            | 211 +++++++++---------
 1 file changed, 109 insertions(+), 102 deletions(-)

--- a/Source/JavaScriptCore/llint/InPlaceInterpreter64.asm
+++ b/Source/JavaScriptCore/llint/InPlaceInterpreter64.asm
@@ -51,7 +51,7 @@ end
 
 # Dispatch target bases
 
-if ARM64 or ARM64E or X86_64
+if ARM64 or ARM64E or X86_64 or RISCV64
 const ipint_dispatch_base = _ipint_unreachable
 end
 
@@ -76,8 +76,15 @@ elsif X86_64
     lshiftq (constexpr (WTF::fastLog2(JSC::IPInt::alignIPInt))), t0
     addq t1, t0
     jmp t0
+elsif RISCV64
+    # RISC-V: synthesize the ARM64 addlshift via lshiftp + addp, since the
+    # baseline rv64gc ISA does not have an add-with-shifted-operand form.
+    pcrtoaddr ipint_dispatch_base, t7
+    lshiftp (constexpr (WTF::fastLog2(JSC::IPInt::alignIPInt))), t0
+    addp t7, t0
+    jmp t0
 else
-    error
+    break
 end
 end
 
@@ -87,7 +94,7 @@ end
 macro pushQuad(reg)
     if ARM64 or ARM64E
         push reg, reg
-    elsif X86_64
+    elsif X86_64 or RISCV64
         push reg, reg
     else
         break
@@ -102,7 +109,7 @@ macro popQuad(reg)
     # FIXME: emit post-increment in offlineasm
     if ARM64 or ARM64E
         loadqinc [sp], reg, V128ISize
-    elsif X86_64
+    elsif X86_64 or RISCV64
         loadq [sp], reg
         addq V128ISize, sp
     else
@@ -208,7 +215,7 @@ macro argumINTDispatch()
     addp 1, MC
     bbgteq argumINTTmp, (constexpr IPInt::ArgumINTBytecode::NumOpcodes), _ipint_argument_dispatch_err
     lshiftp (constexpr (WTF::fastLog2(JSC::IPInt::alignArgumInt))), argumINTTmp
-if ARM64 or ARM64E or X86_64
+if ARM64 or ARM64E or X86_64 or RISCV64
     pcrtoaddr _argumINT_begin, argumINTDsp
     addp argumINTTmp, argumINTDsp
     jmp argumINTDsp
@@ -227,7 +234,7 @@ macro argumINTInitializeDefaultLocals()
 if ARM64 or ARM64E
     # offlineasm doesn't have xzr so emit it
     emit "stp x19, xzr, [x9]"
-elsif X86_64
+elsif X86_64 or RISCV64
     storep argumINTTmp, [argumINTDst]
     storep 0, 8[argumINTDst]
 end
@@ -508,7 +515,7 @@ end
     jmp .ipint_end_ret
 end)
 
-if ARM64 or ARM64E
+if ARM64 or ARM64E or RISCV64
     const IPIntCallCallee = sc1
     const IPIntCallFunctionSlot = sc0
 elsif X86_64
@@ -1777,7 +1784,7 @@ ipintOp(_i32_div_s, macro()
     elsif ARM64 or ARM64E or RISCV64
         divis t1, t0
     else
-        error
+        break
     end
     pushInt32(t0)
     advancePC(1)
@@ -1796,7 +1803,7 @@ ipintOp(_i32_div_u, macro()
     elsif ARM64 or ARM64E or RISCV64
         divi t1, t0
     else
-        error
+        break
     end
     pushInt32(t0)
     advancePC(1)
@@ -1829,7 +1836,7 @@ ipintOp(_i32_rem_s, macro()
     elsif RISCV64
         remis t0, t1, t2
     else
-        error
+        break
     end
 
 .ipint_i32_rem_s_return:
@@ -1854,7 +1861,7 @@ ipintOp(_i32_rem_u, macro()
     elsif RISCV64
         remi t0, t1, t2
     else
-        error
+        break
     end
     pushInt32(t2)
     advancePC(1)
@@ -2034,7 +2041,7 @@ ipintOp(_i64_div_s, macro()
     elsif ARM64 or ARM64E or RISCV64
         divqs t1, t0
     else
-        error
+        break
     end
     pushInt64(t0)
     advancePC(1)
@@ -2053,7 +2060,7 @@ ipintOp(_i64_div_u, macro()
     elsif ARM64 or ARM64E or RISCV64
         divq t1, t0
     else
-        error
+        break
     end
     pushInt64(t0)
     advancePC(1)
@@ -2086,7 +2093,7 @@ ipintOp(_i64_rem_s, macro()
     elsif RISCV64
         remqs t0, t1, t2
     else
-        error
+        break
     end
 
 .ipint_i64_rem_s_return:
@@ -2111,7 +2118,7 @@ ipintOp(_i64_rem_u, macro()
     elsif RISCV64
         remq t0, t1, t2
     else
-        error
+        break
     end
     pushInt64(t2)
     advancePC(1)
@@ -9036,7 +9043,7 @@ macro doI32AtomicLoad(mem, dst)
     if ARM64 or ARM64E or X86_64
         atomicloadi [mem], dst
     else
-        error
+        break
     end
 end
 
@@ -9045,7 +9052,7 @@ macro doI64AtomicLoad(mem, dst)
     if ARM64 or ARM64E or X86_64
         atomicloadq [mem], dst
     else
-        error
+        break
     end
 end
 
@@ -9054,7 +9061,7 @@ macro doI32AtomicLoad8(mem, dst)
     if ARM64 or ARM64E or X86_64
         atomicloadb [mem], dst
     else
-        error
+        break
     end
 end
 
@@ -9063,7 +9070,7 @@ macro doI32AtomicLoad16(mem, dst)
     if ARM64 or ARM64E or X86_64
         atomicloadh [mem], dst
     else
-        error
+        break
     end
 end
 
@@ -9072,7 +9079,7 @@ macro doI64AtomicLoad8(mem, dst)
     if ARM64 or ARM64E or X86_64
         atomicloadb [mem], dst
     else
-        error
+        break
     end
 end
 
@@ -9081,7 +9088,7 @@ macro doI64AtomicLoad16(mem, dst)
     if ARM64 or ARM64E or X86_64
         atomicloadh [mem], dst
     else
-        error
+        break
     end
 end
 
@@ -9090,7 +9097,7 @@ macro doI64AtomicLoad32(mem, dst)
     if ARM64 or ARM64E or X86_64
         atomicloadi [mem], dst
     else
-        error
+        break
     end
 end
 
@@ -9106,7 +9113,7 @@ macro doI32AtomicStore(mem, val, memCopy
             move value, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9122,7 +9129,7 @@ macro doI64AtomicStore(mem, val, memCopy
             move value, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9138,7 +9145,7 @@ macro doI32AtomicStore8(mem, val, memCop
             move value, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9154,7 +9161,7 @@ macro doI32AtomicStore16(mem, val, memCo
             move value, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9170,7 +9177,7 @@ macro doI64AtomicStore8(mem, val, memCop
             move value, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9186,7 +9193,7 @@ macro doI64AtomicStore16(mem, val, memCo
             move value, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9202,7 +9209,7 @@ macro doI64AtomicStore32(mem, val, memCo
             move value, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9219,7 +9226,7 @@ macro doI32AtomicRmwAdd(mem, val, memCop
             addi value, oldValue, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9236,7 +9243,7 @@ macro doI64AtomicRmwAdd(mem, val, memCop
             addq value, oldValue, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9254,7 +9261,7 @@ macro doI32AtomicRmwAdd8(mem, val, memCo
             addi value, oldValue, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9272,7 +9279,7 @@ macro doI32AtomicRmwAdd16(mem, val, memC
             addi value, oldValue, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9290,7 +9297,7 @@ macro doI64AtomicRmwAdd8(mem, val, memCo
             addi value, oldValue, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9308,7 +9315,7 @@ macro doI64AtomicRmwAdd16(mem, val, memC
             addi value, oldValue, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9326,7 +9333,7 @@ macro doI64AtomicRmwAdd32(mem, val, memC
             addi value, oldValue, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9345,7 +9352,7 @@ macro doI32AtomicRmwSub(mem, val, memCop
             subi oldValue, value, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9364,7 +9371,7 @@ macro doI64AtomicRmwSub(mem, val, memCop
             subq oldValue, value, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9384,7 +9391,7 @@ macro doI32AtomicRmwSub8(mem, val, memCo
             subi oldValue, value, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9404,7 +9411,7 @@ macro doI32AtomicRmwSub16(mem, val, memC
             subi oldValue, value, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9424,7 +9431,7 @@ macro doI64AtomicRmwSub8(mem, val, memCo
             subi oldValue, value, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9444,7 +9451,7 @@ macro doI64AtomicRmwSub16(mem, val, memC
             subi oldValue, value, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9464,7 +9471,7 @@ macro doI64AtomicRmwSub32(mem, val, memC
             subi oldValue, value, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9483,7 +9490,7 @@ macro doI32AtomicRmwAnd(mem, val, memCop
             andi value, oldValue, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9502,7 +9509,7 @@ macro doI64AtomicRmwAnd(mem, val, memCop
             andq value, oldValue, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9521,7 +9528,7 @@ macro doI32AtomicRmwAnd8(mem, val, memCo
             andi value, oldValue, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9540,7 +9547,7 @@ macro doI32AtomicRmwAnd16(mem, val, memC
             andi value, oldValue, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9559,7 +9566,7 @@ macro doI64AtomicRmwAnd8(mem, val, memCo
             andi value, oldValue, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9578,7 +9585,7 @@ macro doI64AtomicRmwAnd16(mem, val, memC
             andi value, oldValue, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9597,7 +9604,7 @@ macro doI64AtomicRmwAnd32(mem, val, memC
             andi value, oldValue, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9615,7 +9622,7 @@ macro doI32AtomicRmwOr(mem, val, memCopy
             ori value, oldValue, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9633,7 +9640,7 @@ macro doI64AtomicRmwOr(mem, val, memCopy
             orq value, oldValue, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9651,7 +9658,7 @@ macro doI32AtomicRmwOr8(mem, val, memCop
             ori value, oldValue, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9669,7 +9676,7 @@ macro doI32AtomicRmwOr16(mem, val, memCo
             ori value, oldValue, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9687,7 +9694,7 @@ macro doI64AtomicRmwOr8(mem, val, memCop
             ori value, oldValue, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9705,7 +9712,7 @@ macro doI64AtomicRmwOr16(mem, val, memCo
             ori value, oldValue, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9723,7 +9730,7 @@ macro doI64AtomicRmwOr32(mem, val, memCo
             ori value, oldValue, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9741,7 +9748,7 @@ macro doI32AtomicRmwXor(mem, val, memCop
             xori value, oldValue, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9759,7 +9766,7 @@ macro doI64AtomicRmwXor(mem, val, memCop
             xorq value, oldValue, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9777,7 +9784,7 @@ macro doI32AtomicRmwXor8(mem, val, memCo
             xori value, oldValue, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9795,7 +9802,7 @@ macro doI32AtomicRmwXor16(mem, val, memC
             xori value, oldValue, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9813,7 +9820,7 @@ macro doI64AtomicRmwXor8(mem, val, memCo
             xori value, oldValue, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9831,7 +9838,7 @@ macro doI64AtomicRmwXor16(mem, val, memC
             xori value, oldValue, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9849,7 +9856,7 @@ macro doI64AtomicRmwXor32(mem, val, memC
             xori value, oldValue, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9867,7 +9874,7 @@ macro doI32AtomicRmwXchg(mem, val, memCo
             move value, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9885,7 +9892,7 @@ macro doI64AtomicRmwXchg(mem, val, memCo
             move value, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9903,7 +9910,7 @@ macro doI32AtomicRmwXchg8(mem, val, memC
             move value, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9921,7 +9928,7 @@ macro doI32AtomicRmwXchg16(mem, val, mem
             move value, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9939,7 +9946,7 @@ macro doI64AtomicRmwXchg8(mem, val, memC
             move value, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9957,7 +9964,7 @@ macro doI64AtomicRmwXchg16(mem, val, mem
             move value, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9975,7 +9982,7 @@ macro doI64AtomicRmwXchg32(mem, val, mem
             move value, newValue
         end)
     else
-        error
+        break
     end
 end
 
@@ -9989,7 +9996,7 @@ macro doI32AtomicCmpxchg(mem, expected,
     elsif ARM64
         weakCASExchangeInt(memCopy, newVal, mem, scratch, expected)
     else
-        error
+        break
     end
 end
 
@@ -10002,7 +10009,7 @@ macro doI64AtomicCmpxchg(mem, expected,
     elsif ARM64
         weakCASExchangeQuad(memCopy, newVal, mem, scratch, expected)
     else
-        error
+        break
     end
 end
 
@@ -10016,7 +10023,7 @@ macro doI32AtomicCmpxchg8(mem, expected,
     elsif ARM64
         weakCASExchangeByte(memCopy, newVal, mem, scratch, expected)
     else
-        error
+        break
     end
 end
 
@@ -10030,7 +10037,7 @@ macro doI32AtomicCmpxchg16(mem, expected
     elsif ARM64
         weakCASExchangeHalf(memCopy, newVal, mem, scratch, expected)
     else
-        error
+        break
     end
 end
 
@@ -10044,7 +10051,7 @@ macro doI64AtomicCmpxchg8(mem, expected,
     elsif ARM64
         weakCASExchangeByte(memCopy, newVal, mem, scratch, expected)
     else
-        error
+        break
     end
 end
 
@@ -10058,7 +10065,7 @@ macro doI64AtomicCmpxchg16(mem, expected
     elsif ARM64
         weakCASExchangeHalf(memCopy, newVal, mem, scratch, expected)
     else
-        error
+        break
     end
 end
 
@@ -10072,7 +10079,7 @@ macro doI64AtomicCmpxchg32(mem, expected
     elsif ARM64
         weakCASExchangeInt(memCopy, newVal, mem, scratch, expected)
     else
-        error
+        break
     end
 end
 
@@ -10744,7 +10751,7 @@ macro weakCASExchangeByte(mem, value, ex
     .done:
         move scratch2, expected
     else
-        error
+        break
     end
 end
 
@@ -10764,7 +10771,7 @@ macro weakCASExchangeHalf(mem, value, ex
     .done:
         move scratch2, expected
     else
-        error
+        break
     end
 end
 
@@ -10784,7 +10791,7 @@ macro weakCASExchangeInt(mem, value, exp
     .done:
         move scratch2, expected
     else
-        error
+        break
     end
 end
 
@@ -10804,7 +10811,7 @@ macro weakCASExchangeQuad(mem, value, ex
     .done:
         move scratch2, expected
     else
-        error
+        break
     end
 end
 
@@ -12125,7 +12132,7 @@ mintAlign(_a1)
     mintArgDispatch()
 
 mintAlign(_a2)
-if ARM64 or ARM64E or X86_64
+if ARM64 or ARM64E or X86_64 or RISCV64
     mintPop(a2)
     mintArgDispatch()
 else
@@ -12133,7 +12140,7 @@ else
 end
 
 mintAlign(_a3)
-if ARM64 or ARM64E or X86_64
+if ARM64 or ARM64E or X86_64 or RISCV64
     mintPop(a3)
     mintArgDispatch()
 else
@@ -12141,7 +12148,7 @@ else
 end
 
 mintAlign(_a4)
-if ARM64 or ARM64E or X86_64
+if ARM64 or ARM64E or X86_64 or RISCV64
     mintPop(a4)
     mintArgDispatch()
 else
@@ -12149,7 +12156,7 @@ else
 end
 
 mintAlign(_a5)
-if ARM64 or ARM64E or X86_64
+if ARM64 or ARM64E or X86_64 or RISCV64
     mintPop(a5)
     mintArgDispatch()
 else
@@ -12157,7 +12164,7 @@ else
 end
 
 mintAlign(_a6)
-if ARM64 or ARM64E
+if ARM64 or ARM64E or RISCV64
     mintPop(a6)
     mintArgDispatch()
 else
@@ -12165,7 +12172,7 @@ else
 end
 
 mintAlign(_a7)
-if ARM64 or ARM64E
+if ARM64 or ARM64E or RISCV64
     mintPop(a7)
     mintArgDispatch()
 else
@@ -12359,7 +12366,7 @@ mintAlign(_r1)
     mintRetDispatch()
 
 mintAlign(_r2)
-if ARM64 or ARM64E or X86_64
+if ARM64 or ARM64E or X86_64 or RISCV64
     subp StackValueSize, mintRetDst
     storeq wa2, [mintRetDst]
     mintRetDispatch()
@@ -12368,7 +12375,7 @@ else
 end
 
 mintAlign(_r3)
-if ARM64 or ARM64E or X86_64
+if ARM64 or ARM64E or X86_64 or RISCV64
     subp StackValueSize, mintRetDst
     storeq wa3, [mintRetDst]
     mintRetDispatch()
@@ -12377,7 +12384,7 @@ else
 end
 
 mintAlign(_r4)
-if ARM64 or ARM64E or X86_64
+if ARM64 or ARM64E or X86_64 or RISCV64
     subp StackValueSize, mintRetDst
     storeq wa4, [mintRetDst]
     mintRetDispatch()
@@ -12386,7 +12393,7 @@ else
 end
 
 mintAlign(_r5)
-if ARM64 or ARM64E or X86_64
+if ARM64 or ARM64E or X86_64 or RISCV64
     subp StackValueSize, mintRetDst
     storeq wa5, [mintRetDst]
     mintRetDispatch()
@@ -12395,7 +12402,7 @@ else
 end
 
 mintAlign(_r6)
-if ARM64 or ARM64E
+if ARM64 or ARM64E or RISCV64
     subp StackValueSize, mintRetDst
     storeq wa6, [mintRetDst]
     mintRetDispatch()
@@ -12404,7 +12411,7 @@ else
 end
 
 mintAlign(_r7)
-if ARM64 or ARM64E
+if ARM64 or ARM64E or RISCV64
     subp StackValueSize, mintRetDst
     storeq wa7, [mintRetDst]
     mintRetDispatch()
@@ -12703,7 +12710,7 @@ uintAlign(_r5)
     uintDispatch()
 
 uintAlign(_r6)
-if ARM64 or ARM64E
+if ARM64 or ARM64E or RISCV64
     popQuad(wa6)
     uintDispatch()
 else
@@ -12711,7 +12718,7 @@ else
 end
 
 uintAlign(_r7)
-if ARM64 or ARM64E
+if ARM64 or ARM64E or RISCV64
     popQuad(wa7)
     uintDispatch()
 else
@@ -12792,7 +12799,7 @@ argumINTAlign(_a1)
     argumINTDispatch()
 
 argumINTAlign(_a2)
-if ARM64 or ARM64E or X86_64
+if ARM64 or ARM64E or X86_64 or RISCV64
     storeq wa2, [argumINTDst]
     subp LocalSize, argumINTDst
     argumINTDispatch()
@@ -12802,7 +12809,7 @@ end
 
 
 argumINTAlign(_a3)
-if ARM64 or ARM64E or X86_64
+if ARM64 or ARM64E or X86_64 or RISCV64
     storeq wa3, [argumINTDst]
     subp LocalSize, argumINTDst
     argumINTDispatch()
@@ -12811,7 +12818,7 @@ else
 end
 
 argumINTAlign(_a4)
-if ARM64 or ARM64E or X86_64
+if ARM64 or ARM64E or X86_64 or RISCV64
     storeq wa4, [argumINTDst]
     subp LocalSize, argumINTDst
     argumINTDispatch()
@@ -12820,7 +12827,7 @@ else
 end
 
 argumINTAlign(_a5)
-if ARM64 or ARM64E or X86_64
+if ARM64 or ARM64E or X86_64 or RISCV64
     storeq wa5, [argumINTDst]
     subp LocalSize, argumINTDst
     argumINTDispatch()
@@ -12829,7 +12836,7 @@ else
 end
 
 argumINTAlign(_a6)
-if ARM64 or ARM64E
+if ARM64 or ARM64E or RISCV64
     storeq wa6, [argumINTDst]
     subp LocalSize, argumINTDst
     argumINTDispatch()
@@ -12838,7 +12845,7 @@ else
 end
 
 argumINTAlign(_a7)
-if ARM64 or ARM64E
+if ARM64 or ARM64E or RISCV64
     storeq wa7, [argumINTDst]
     subp LocalSize, argumINTDst
     argumINTDispatch()