[RISC-V] Add pseudoinstructions to disassembler - #102260

Merged
jakobbotsch merged 25 commits into
dotnet:mainfrom
Bajtazar:riscv-add-pseudo-to-disasm
May 29, 2024
Merged

[RISC-V] Add pseudoinstructions to disassembler#102260
jakobbotsch merged 25 commits into
dotnet:mainfrom
Bajtazar:riscv-add-pseudo-to-disasm

Conversation

@Bajtazar

Copy link
Copy Markdown
Contributor

Adds pseudoinstruction printing to the disassembler. Requested in #102074 (comment)

Part of #84834, cc @dotnet/samsung

@ghostghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label May 15, 2024
@dotnet-policy-servicedotnet-policy-serviceBot added the community-contribution Indicates that the PR has been added by a community member label May 15, 2024
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

@clamp03clamp03 added the arch-riscv Related to the RISC-V architecture label May 15, 2024
Comment threadsrc/coreclr/jit/emitriscv64.cpp
Comment threadsrc/coreclr/jit/emitriscv64.cpp Outdated
Comment threadsrc/coreclr/jit/emitriscv64.cpp Outdated
Comment threadsrc/coreclr/jit/emitriscv64.cpp Outdated
@Bajtazar
Bajtazar requested review from clamp03 and tomeksowiMay 16, 2024 10:47

@clamp03clamp03 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Did you check coreclr test? Could you show some dump examples?

@Bajtazar

Copy link
Copy Markdown
ContributorAuthor

LGTM Did you check coreclr test? Could you show some dump examples?

Tests passes fine

Examples of disassm:

  • mv instruction

Prior

 slli a2, a2,7 addi a2, a2,0 ld a2,0(a2)

New

 slli a2, a2,7 mv a2, a2 ld a2,0(a2)
  • bnezand j instructions

Prior

G_M10072_IG07: ;; offset=0x0064 sltiu a0, s1,65 slli a0, a0,56 srli a0, a0,56 addiw t6, a0,0 bne t6, zero, G_M10072_IG11 jal zero,80

New

G_M10072_IG07: ;; offset=0x0064 sltiu a0, s1,65 slli a0, a0,56 srli a0, a0,56 addiw t6, a0,0 bnez t6, G_M10072_IG11 j 80
  • nop instruction

Prior

G_M55990_IG31: ;; offset=0x1578 addi zero, zero,0

New

G_M55990_IG31: ;; offset=0x1578nop

@clamp03
clamp03 requested review from jakobbotsch and jkotasMay 21, 2024 00:29
@clamp03

Copy link
Copy Markdown
Member

@tomeksowi@jakobbotsch@jkotas Could you review this PR?

Comment threadsrc/coreclr/jit/emitriscv64.cpp Outdated
@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio0-checked: 2718 / 2738 (99.27%)

details

GIT: 6869460


=======================
passed: 2718
failed: 3
skipped: 16
killed: 1
------------------------
TOTAL libs: 2738
TOTAL tests: 2738
REAL time: 36min 26s 575ms
=======================
failed tests
[44.460s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[28.930s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[290.630s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
killed tests
[1810.536s] profiler.eventpipe.reverse_startup.reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio0-checked: 2720 / 2738 (99.34%)

details

GIT: 6869460


=======================
passed: 2720
failed: 2
skipped: 16
killed: 0
------------------------
TOTAL libs: 2738
TOTAL tests: 2738
REAL time: 1h 4min 5s 272ms
=======================
failed tests
[408.370s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[726.860s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio1-checked: 9396 / 9443 (99.50%)

details

GIT: 6869460


=======================
passed: 9396
failed: 4
skipped: 42
killed: 1
------------------------
TOTAL libs: 9443
TOTAL tests: 9443
REAL time: 1h 17min 16s 683ms
=======================
failed tests
[48.630s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[38.310s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[349.840s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[706.940s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
[1800.886s] profiler.eventpipe.reverse_startup.reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio1-checked: 9399 / 9443 (99.53%)

details

GIT: 6869460


=======================
passed: 9399
failed: 2
skipped: 42
killed: 0
------------------------
TOTAL libs: 9443
TOTAL tests: 9443
REAL time: 2h 50min 28s 269ms
=======================
failed tests
[416.290s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[704.320s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@jakobbotschjakobbotsch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please fix the conflicts?

@risc-vv

Copy link
Copy Markdown

RISC-V testing failed on init-build

details

GIT: a4381bd

Cloning into 'runtime'...
Updating files: 16% (9631/58593)
Updating files: 17% (9961/58593)
Updating files: 18% (10547/58593)
Updating files: 19% (11133/58593)
Updating files: 20% (11719/58593)
Updating files: 21% (12305/58593)
Updating files: 22% (12891/58593)
Updating files: 23% (13477/58593)
Updating files: 24% (14063/58593)
Updating files: 25% (14649/58593)
Updating files: 26% (15235/58593)
Updating files: 27% (15821/58593)
Updating files: 28% (16407/58593)
Updating files: 29% (16992/58593)
Updating files: 30% (17578/58593)
Updating files: 31% (18164/58593)
Updating files: 32% (18750/58593)
Updating files: 33% (19336/58593)
Updating files: 34% (19922/58593)
Updating files: 35% (20508/58593)
Updating files: 35% (20968/58593)
Updating files: 36% (21094/58593)
Updating files: 37% (21680/58593)
Updating files: 38% (22266/58593)
Updating files: 39% (22852/58593)
Updating files: 40% (23438/58593)
Updating files: 41% (24024/58593)
Updating files: 42% (24610/58593)
Updating files: 43% (25195/58593)
Updating files: 44% (25781/58593)
Updating files: 45% (26367/58593)
Updating files: 46% (26953/58593)
Updating files: 47% (27539/58593)
Updating files: 48% (28125/58593)
Updating files: 49% (28711/58593)
Updating files: 50% (29297/58593)
Updating files: 51% (29883/58593)
Updating files: 52% (30469/58593)
Updating files: 53% (31055/58593)
Updating files: 54% (31641/58593)
Updating files: 55% (32227/58593)
Updating files: 56% (32813/58593)
Updating files: 57% (33399/58593)
Updating files: 58% (33984/58593)
Updating files: 58% (34531/58593)
Updating files: 59% (34570/58593)
Updating files: 60% (35156/58593)
Updating files: 61% (35742/58593)
Updating files: 62% (36328/58593)
Updating files: 63% (36914/58593)
Updating files: 64% (37500/58593)
Updating files: 65% (38086/58593)
Updating files: 66% (38672/58593)
Updating files: 67% (39258/58593)
Updating files: 68% (39844/58593)
Updating files: 69% (40430/58593)
Updating files: 70% (41016/58593)
Updating files: 71% (41602/58593)
Updating files: 72% (42187/58593)
Updating files: 73% (42773/58593)
Updating files: 74% (43359/58593)
Updating files: 75% (43945/58593)
Updating files: 76% (44531/58593)
Updating files: 77% (45117/58593)
Updating files: 78% (45703/58593)
Updating files: 79% (46289/58593)
Updating files: 80% (46875/58593)
Updating files: 81% (47461/58593)
Updating files: 82% (48047/58593)
Updating files: 83% (48633/58593)
Updating files: 84% (49219/58593)
Updating files: 84% (49312/58593)
Updating files: 85% (49805/58593)
Updating files: 86% (50390/58593)
Updating files: 87% (50976/58593)
Updating files: 88% (51562/58593)
Updating files: 89% (52148/58593)
Updating files: 90% (52734/58593)
Updating files: 91% (53320/58593)
Updating files: 92% (53906/58593)
Updating files: 93% (54492/58593)
Updating files: 94% (55078/58593)
Updating files: 95% (55664/58593)
Updating files: 96% (56250/58593)
Updating files: 97% (56836/58593)
Updating files: 98% (57422/58593)
Updating files: 99% (58008/58593)
Updating files: 100% (58593/58593)
Updating files: 100% (58593/58593), done.
Switched to a new branch 'build-net'
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3506 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3506 (offset 3 lines).
Hunk #2 succeeded at 3555 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3508 (offset 3 lines).
Hunk #2 succeeded at 3532 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3508 (offset 3 lines).
Hunk #2 succeeded at 3570 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3347 (offset 3 lines).
Hunk #2 succeeded at 3413 (offset 3 lines).
Hunk #3 succeeded at 3822 (offset 10 lines).
Checking patch src/coreclr/jit/emitriscv64.h...
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3825 (offset 10 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3347 (offset 3 lines).
Hunk #2 succeeded at 3367 (offset 3 lines).
Hunk #3 succeeded at 3457 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3478 (offset 3 lines).
Hunk #2 succeeded at 3516 (offset 3 lines).
Hunk #3 succeeded at 3822 (offset 10 lines).
Hunk #4 succeeded at 3901 (offset 10 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3428 (offset 3 lines).
Hunk #2 succeeded at 3531 (offset 3 lines).
Hunk #3 succeeded at 3908 (offset 10 lines).
Checking patch src/coreclr/jit/codegenriscv64.cpp...
Checking patch src/coreclr/jit/emitriscv64.cpp...
error: while searching for:
{
code_t code = emitInsCode(ins);if (INS_mov == ins)
{
assert(isGeneralRegisterOrR0(reg1));
assert(isGeneralRegisterOrR0(reg2));
error: patch failed: src/coreclr/jit/emitriscv64.cpp:588
error: src/coreclr/jit/emitriscv64.cpp: patch does not apply
Checking patch src/coreclr/jit/instrsriscv64.h...
error: while searching for:
INST(nop, "nop", 0, 0x00000013)
//// R_R
INST(mov, "mov", 0, 0x00000013)
////R_I
INST(lui, "lui", 0, 0x00000037)
error: patch failed: src/coreclr/jit/instrsriscv64.h:35
error: src/coreclr/jit/instrsriscv64.h: patch does not apply
Checking patch src/coreclr/jit/codegenriscv64.cpp...
Checking patch src/coreclr/jit/emitriscv64.cpp...
error: while searching for:
inline bool emitter::emitInsMayWriteToGCReg(instruction ins)
{
assert(ins != INS_invalid);return (ins <= INS_remuw) && (ins >= INS_mv) &&!(ins >= INS_jal && ins <= INS_bgeu && ins != INS_jalr) &&
(CodeGenInterface::instInfo[ins] & ST) == 0
?true:false;
error: patch failed: src/coreclr/jit/emitriscv64.cpp:141
error: src/coreclr/jit/emitriscv64.cpp: patch does not apply
Checking patch src/coreclr/jit/instrsriscv64.h...
error: while searching for:
INST(nop, "nop", 0, 0x00000013)
//// R_R
INST(mv, "mv", 0, 0x00000013)
////R_I
INST(lui, "lui", 0, 0x00000037)
error: patch failed: src/coreclr/jit/instrsriscv64.h:35
error: src/coreclr/jit/instrsriscv64.h: patch does not apply
Checking patch src/coreclr/jit/instrsriscv64.h...
error: while searching for:
INST(nop, "nop", 0, 0x00000013)
//// R_R
INST(mov, "mov", 0, 0x00000013)
////R_I
INST(lui, "lui", 0, 0x00000037)
error: patch failed: src/coreclr/jit/instrsriscv64.h:35
error: src/coreclr/jit/instrsriscv64.h: patch does not apply
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3360 (offset 3 lines).
Hunk #2 succeeded at 3373 (offset 3 lines).
Hunk #3 succeeded at 3524 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3540 (offset 3 lines).
Hunk #2 succeeded at 3562 (offset 3 lines).
Hunk #3 succeeded at 3587 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
error: while searching for:
case 0x0: // ADDIW
printf("addiw %s, %s, %d\n", rd, rs1, imm12);return;case 0x1: // SLLIW
printf("slliw %s, %s, %d\n", rd, rs1, imm12 & 0x3f); // 6 BITS forSHAMTin RISCV64
return;case 0x5: // SRLIW & SRAIW
if(((code >>30) &0x1) ==0) { printf("srliw %s, %s, %d\n", rd, rs1, imm12 & 0x1f); // 5BITS for SHAMT in RISCV64 } else { printf("sraiw %s, %s, %d\n", rd, rs1, imm12 & 0x1f); // 5BITS for SHAMT in RISCV64 } return; default: printf("RISCV64 illegal instruction: 0x%08X\n", code); return; } } case 0x33:error: patch failed: src/coreclr/jit/emitriscv64.cpp:3614error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...error: while searching for: case 0x5: // SRLIW & SRAIW { static constexpr unsigned kLogicalShiftFunct7 = 0x00; static constexpr unsigned kArithmeticShiftFunct7 = 0x30; unsigned funct7 = (imm12 >> 5) & 0x7f; if (funct7 == kLogicalShiftFunct7)error: patch failed: src/coreclr/jit/emitriscv64.cpp:3631error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...error: while searching for: case 0x1: // SLLIW { unsigned funct7 = (imm12 >> 5) & 0x7f; // SLLI's instruction code's upper 7 bits have to be equal to zero if (funct7 == 0) { printf("slliw %s, %s, %d\n", rd, rs1, imm12 & 0x1f); // 5 BITS for SHAMT in RISCV64error: patch failed: src/coreclr/jit/emitriscv64.cpp:3617error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...Hunk #1 succeeded at 3563 (offset 3 lines).error: while searching for: return; case 0x5: // SRLIW & SRAIW { static constexpr unsigned kLogicalShiftFunct7 = 0x00; static constexpr unsigned kArithmeticShiftFunct7 = 0x20; unsigned funct7 = (imm12 >> 5) & 0x7f; if (funct7 == kLogicalShiftFunct7)error: patch failed: src/coreclr/jit/emitriscv64.cpp:3630error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...Hunk #1 succeeded at 3541 (offset 3 lines).error: while searching for: return; case 0x1: // SLLIW { unsigned funct7 = (imm12 >> 5) & 0x7f; // SLLIW's instruction code's upper 7 bits have to be equal to zero if (funct7 == 0) { printf("slliw %s, %s, %d\n", rd, rs1, imm12 & 0x1f); // 5 BITS for SHAMT in RISCV64 }error: patch failed: src/coreclr/jit/emitriscv64.cpp:3616error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...Hunk #1 succeeded at 3644 (offset -14 lines).Checking patch src/coreclr/jit/emitriscv64.cpp...Hunk #1 succeeded at 3733 (offset -14 lines).Checking patch src/coreclr/jit/emitriscv64.cpp...error: while searching for: break; case 0x1: // SLLI { static constexpr kSlliFunct6 = 0b000000; unsigned funct6 = (imm12 >> 6) & 0x3f; // SLLI's instruction code's upper 6 bits have to be equal to zeroerror: patch failed: src/coreclr/jit/emitriscv64.cpp:3538error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...error: while searching for: switch (opcode3) { case 0x0: // ADDW return; return; case 0x1: // SLLW printf("sllw %s, %s, %s\n", rd, rs1, rs2); return; case 0x5: // SRLW { return; default: return emitDispIllegalInstruction(code);error: patch failed: src/coreclr/jit/emitriscv64.cpp:3759error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...Hunk #1 succeeded at 3591 (offset 1 line).

@Bajtazar

Copy link
Copy Markdown
ContributorAuthor

Can you please fix the conflicts?

Conflicts have been fixed. Could you please review new changes?

@jakobbotsch
jakobbotsch merged commit d9bc680 into dotnet:mainMay 29, 2024
Ruihan-Yin pushed a commit to Ruihan-Yin/runtime that referenced this pull request May 30, 2024
* [RISC-V] Reworked emitDispInsName a bit to ease further development
* [RISC-V] Little improvements
* [RISC-V] Refactored code
* [RISC-V] Added mv and nop pseudoinstructions to disasm
* [RISC-V] Added branch pseudos to disasm
* [RISC-V] Removed dead code
* [RISC-V] Fixes
* [RISC-V] Added j pseudoinstruction to disasm
* [RISC-V] Improved readability
* [RISC-V] Fixed mov pseudoinstruction
* Revert "[RISC-V] Fixed mov pseudoinstruction"
This reverts commit a011c43.
* [RISC-V] Fixed mov printing name
* [RISC-V] After review changes
* [RISC-V] More fixes after review
* [RISC-V] Adjusted 32-bit shift disasm to changes
* [RISC-V] Fixed bug
* [RISC-V] Fixed comment
* [RISC-V] Changed constants' literal type
* [RISC-V] Added more constants
* [RISC-V] Reinforced printing 1
* [RISC-V] Reinforced printing 2
* [RISC-V] Fixed bug
* [RISC-V] Resolved more bugs
* [RISC-V] Removed dead assert
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Jun 29, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-riscvRelated to the RISC-V architecturearea-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIcommunity-contributionIndicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@Bajtazar@clamp03@risc-vv@tomeksowi@jakobbotsch@sirntar
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

[RISC-V] Add pseudoinstructions to disassembler - #102260

Merged
jakobbotsch merged 25 commits into
dotnet:mainfrom
Bajtazar:riscv-add-pseudo-to-disasm
May 29, 2024
Merged

[RISC-V] Add pseudoinstructions to disassembler#102260
jakobbotsch merged 25 commits into
dotnet:mainfrom
Bajtazar:riscv-add-pseudo-to-disasm

Conversation

@Bajtazar

Copy link
Copy Markdown
Contributor

Adds pseudoinstruction printing to the disassembler. Requested in #102074 (comment)

Part of #84834, cc @dotnet/samsung

@ghostghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label May 15, 2024
@dotnet-policy-servicedotnet-policy-serviceBot added the community-contribution Indicates that the PR has been added by a community member label May 15, 2024
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

@clamp03clamp03 added the arch-riscv Related to the RISC-V architecture label May 15, 2024
Comment threadsrc/coreclr/jit/emitriscv64.cpp
Comment threadsrc/coreclr/jit/emitriscv64.cpp Outdated
Comment threadsrc/coreclr/jit/emitriscv64.cpp Outdated
Comment threadsrc/coreclr/jit/emitriscv64.cpp Outdated
@Bajtazar
Bajtazar requested review from clamp03 and tomeksowiMay 16, 2024 10:47

@clamp03clamp03 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Did you check coreclr test? Could you show some dump examples?

@Bajtazar

Copy link
Copy Markdown
ContributorAuthor

LGTM Did you check coreclr test? Could you show some dump examples?

Tests passes fine

Examples of disassm:

  • mv instruction

Prior

 slli a2, a2,7 addi a2, a2,0 ld a2,0(a2)

New

 slli a2, a2,7 mv a2, a2 ld a2,0(a2)
  • bnezand j instructions

Prior

G_M10072_IG07: ;; offset=0x0064 sltiu a0, s1,65 slli a0, a0,56 srli a0, a0,56 addiw t6, a0,0 bne t6, zero, G_M10072_IG11 jal zero,80

New

G_M10072_IG07: ;; offset=0x0064 sltiu a0, s1,65 slli a0, a0,56 srli a0, a0,56 addiw t6, a0,0 bnez t6, G_M10072_IG11 j 80
  • nop instruction

Prior

G_M55990_IG31: ;; offset=0x1578 addi zero, zero,0

New

G_M55990_IG31: ;; offset=0x1578nop

@clamp03
clamp03 requested review from jakobbotsch and jkotasMay 21, 2024 00:29
@clamp03

Copy link
Copy Markdown
Member

@tomeksowi@jakobbotsch@jkotas Could you review this PR?

Comment threadsrc/coreclr/jit/emitriscv64.cpp Outdated
@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio0-checked: 2718 / 2738 (99.27%)

details

GIT: 6869460


=======================
passed: 2718
failed: 3
skipped: 16
killed: 1
------------------------
TOTAL libs: 2738
TOTAL tests: 2738
REAL time: 36min 26s 575ms
=======================
failed tests
[44.460s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[28.930s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[290.630s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
killed tests
[1810.536s] profiler.eventpipe.reverse_startup.reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio0-checked: 2720 / 2738 (99.34%)

details

GIT: 6869460


=======================
passed: 2720
failed: 2
skipped: 16
killed: 0
------------------------
TOTAL libs: 2738
TOTAL tests: 2738
REAL time: 1h 4min 5s 272ms
=======================
failed tests
[408.370s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[726.860s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio1-checked: 9396 / 9443 (99.50%)

details

GIT: 6869460


=======================
passed: 9396
failed: 4
skipped: 42
killed: 1
------------------------
TOTAL libs: 9443
TOTAL tests: 9443
REAL time: 1h 17min 16s 683ms
=======================
failed tests
[48.630s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[38.310s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[349.840s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[706.940s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
[1800.886s] profiler.eventpipe.reverse_startup.reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio1-checked: 9399 / 9443 (99.53%)

details

GIT: 6869460


=======================
passed: 9399
failed: 2
skipped: 42
killed: 0
------------------------
TOTAL libs: 9443
TOTAL tests: 9443
REAL time: 2h 50min 28s 269ms
=======================
failed tests
[416.290s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[704.320s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@jakobbotschjakobbotsch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please fix the conflicts?

@risc-vv

Copy link
Copy Markdown

RISC-V testing failed on init-build

details

GIT: a4381bd

Cloning into 'runtime'...
Updating files: 16% (9631/58593)
Updating files: 17% (9961/58593)
Updating files: 18% (10547/58593)
Updating files: 19% (11133/58593)
Updating files: 20% (11719/58593)
Updating files: 21% (12305/58593)
Updating files: 22% (12891/58593)
Updating files: 23% (13477/58593)
Updating files: 24% (14063/58593)
Updating files: 25% (14649/58593)
Updating files: 26% (15235/58593)
Updating files: 27% (15821/58593)
Updating files: 28% (16407/58593)
Updating files: 29% (16992/58593)
Updating files: 30% (17578/58593)
Updating files: 31% (18164/58593)
Updating files: 32% (18750/58593)
Updating files: 33% (19336/58593)
Updating files: 34% (19922/58593)
Updating files: 35% (20508/58593)
Updating files: 35% (20968/58593)
Updating files: 36% (21094/58593)
Updating files: 37% (21680/58593)
Updating files: 38% (22266/58593)
Updating files: 39% (22852/58593)
Updating files: 40% (23438/58593)
Updating files: 41% (24024/58593)
Updating files: 42% (24610/58593)
Updating files: 43% (25195/58593)
Updating files: 44% (25781/58593)
Updating files: 45% (26367/58593)
Updating files: 46% (26953/58593)
Updating files: 47% (27539/58593)
Updating files: 48% (28125/58593)
Updating files: 49% (28711/58593)
Updating files: 50% (29297/58593)
Updating files: 51% (29883/58593)
Updating files: 52% (30469/58593)
Updating files: 53% (31055/58593)
Updating files: 54% (31641/58593)
Updating files: 55% (32227/58593)
Updating files: 56% (32813/58593)
Updating files: 57% (33399/58593)
Updating files: 58% (33984/58593)
Updating files: 58% (34531/58593)
Updating files: 59% (34570/58593)
Updating files: 60% (35156/58593)
Updating files: 61% (35742/58593)
Updating files: 62% (36328/58593)
Updating files: 63% (36914/58593)
Updating files: 64% (37500/58593)
Updating files: 65% (38086/58593)
Updating files: 66% (38672/58593)
Updating files: 67% (39258/58593)
Updating files: 68% (39844/58593)
Updating files: 69% (40430/58593)
Updating files: 70% (41016/58593)
Updating files: 71% (41602/58593)
Updating files: 72% (42187/58593)
Updating files: 73% (42773/58593)
Updating files: 74% (43359/58593)
Updating files: 75% (43945/58593)
Updating files: 76% (44531/58593)
Updating files: 77% (45117/58593)
Updating files: 78% (45703/58593)
Updating files: 79% (46289/58593)
Updating files: 80% (46875/58593)
Updating files: 81% (47461/58593)
Updating files: 82% (48047/58593)
Updating files: 83% (48633/58593)
Updating files: 84% (49219/58593)
Updating files: 84% (49312/58593)
Updating files: 85% (49805/58593)
Updating files: 86% (50390/58593)
Updating files: 87% (50976/58593)
Updating files: 88% (51562/58593)
Updating files: 89% (52148/58593)
Updating files: 90% (52734/58593)
Updating files: 91% (53320/58593)
Updating files: 92% (53906/58593)
Updating files: 93% (54492/58593)
Updating files: 94% (55078/58593)
Updating files: 95% (55664/58593)
Updating files: 96% (56250/58593)
Updating files: 97% (56836/58593)
Updating files: 98% (57422/58593)
Updating files: 99% (58008/58593)
Updating files: 100% (58593/58593)
Updating files: 100% (58593/58593), done.
Switched to a new branch 'build-net'
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3506 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3506 (offset 3 lines).
Hunk #2 succeeded at 3555 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3508 (offset 3 lines).
Hunk #2 succeeded at 3532 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3508 (offset 3 lines).
Hunk #2 succeeded at 3570 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3347 (offset 3 lines).
Hunk #2 succeeded at 3413 (offset 3 lines).
Hunk #3 succeeded at 3822 (offset 10 lines).
Checking patch src/coreclr/jit/emitriscv64.h...
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3825 (offset 10 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3347 (offset 3 lines).
Hunk #2 succeeded at 3367 (offset 3 lines).
Hunk #3 succeeded at 3457 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3478 (offset 3 lines).
Hunk #2 succeeded at 3516 (offset 3 lines).
Hunk #3 succeeded at 3822 (offset 10 lines).
Hunk #4 succeeded at 3901 (offset 10 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3428 (offset 3 lines).
Hunk #2 succeeded at 3531 (offset 3 lines).
Hunk #3 succeeded at 3908 (offset 10 lines).
Checking patch src/coreclr/jit/codegenriscv64.cpp...
Checking patch src/coreclr/jit/emitriscv64.cpp...
error: while searching for:
{
code_t code = emitInsCode(ins);if (INS_mov == ins)
{
assert(isGeneralRegisterOrR0(reg1));
assert(isGeneralRegisterOrR0(reg2));
error: patch failed: src/coreclr/jit/emitriscv64.cpp:588
error: src/coreclr/jit/emitriscv64.cpp: patch does not apply
Checking patch src/coreclr/jit/instrsriscv64.h...
error: while searching for:
INST(nop, "nop", 0, 0x00000013)
//// R_R
INST(mov, "mov", 0, 0x00000013)
////R_I
INST(lui, "lui", 0, 0x00000037)
error: patch failed: src/coreclr/jit/instrsriscv64.h:35
error: src/coreclr/jit/instrsriscv64.h: patch does not apply
Checking patch src/coreclr/jit/codegenriscv64.cpp...
Checking patch src/coreclr/jit/emitriscv64.cpp...
error: while searching for:
inline bool emitter::emitInsMayWriteToGCReg(instruction ins)
{
assert(ins != INS_invalid);return (ins <= INS_remuw) && (ins >= INS_mv) &&!(ins >= INS_jal && ins <= INS_bgeu && ins != INS_jalr) &&
(CodeGenInterface::instInfo[ins] & ST) == 0
?true:false;
error: patch failed: src/coreclr/jit/emitriscv64.cpp:141
error: src/coreclr/jit/emitriscv64.cpp: patch does not apply
Checking patch src/coreclr/jit/instrsriscv64.h...
error: while searching for:
INST(nop, "nop", 0, 0x00000013)
//// R_R
INST(mv, "mv", 0, 0x00000013)
////R_I
INST(lui, "lui", 0, 0x00000037)
error: patch failed: src/coreclr/jit/instrsriscv64.h:35
error: src/coreclr/jit/instrsriscv64.h: patch does not apply
Checking patch src/coreclr/jit/instrsriscv64.h...
error: while searching for:
INST(nop, "nop", 0, 0x00000013)
//// R_R
INST(mov, "mov", 0, 0x00000013)
////R_I
INST(lui, "lui", 0, 0x00000037)
error: patch failed: src/coreclr/jit/instrsriscv64.h:35
error: src/coreclr/jit/instrsriscv64.h: patch does not apply
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3360 (offset 3 lines).
Hunk #2 succeeded at 3373 (offset 3 lines).
Hunk #3 succeeded at 3524 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3540 (offset 3 lines).
Hunk #2 succeeded at 3562 (offset 3 lines).
Hunk #3 succeeded at 3587 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
error: while searching for:
case 0x0: // ADDIW
printf("addiw %s, %s, %d\n", rd, rs1, imm12);return;case 0x1: // SLLIW
printf("slliw %s, %s, %d\n", rd, rs1, imm12 & 0x3f); // 6 BITS forSHAMTin RISCV64
return;case 0x5: // SRLIW & SRAIW
if(((code >>30) &0x1) ==0) { printf("srliw %s, %s, %d\n", rd, rs1, imm12 & 0x1f); // 5BITS for SHAMT in RISCV64 } else { printf("sraiw %s, %s, %d\n", rd, rs1, imm12 & 0x1f); // 5BITS for SHAMT in RISCV64 } return; default: printf("RISCV64 illegal instruction: 0x%08X\n", code); return; } } case 0x33:error: patch failed: src/coreclr/jit/emitriscv64.cpp:3614error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...error: while searching for: case 0x5: // SRLIW & SRAIW { static constexpr unsigned kLogicalShiftFunct7 = 0x00; static constexpr unsigned kArithmeticShiftFunct7 = 0x30; unsigned funct7 = (imm12 >> 5) & 0x7f; if (funct7 == kLogicalShiftFunct7)error: patch failed: src/coreclr/jit/emitriscv64.cpp:3631error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...error: while searching for: case 0x1: // SLLIW { unsigned funct7 = (imm12 >> 5) & 0x7f; // SLLI's instruction code's upper 7 bits have to be equal to zero if (funct7 == 0) { printf("slliw %s, %s, %d\n", rd, rs1, imm12 & 0x1f); // 5 BITS for SHAMT in RISCV64error: patch failed: src/coreclr/jit/emitriscv64.cpp:3617error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...Hunk #1 succeeded at 3563 (offset 3 lines).error: while searching for: return; case 0x5: // SRLIW & SRAIW { static constexpr unsigned kLogicalShiftFunct7 = 0x00; static constexpr unsigned kArithmeticShiftFunct7 = 0x20; unsigned funct7 = (imm12 >> 5) & 0x7f; if (funct7 == kLogicalShiftFunct7)error: patch failed: src/coreclr/jit/emitriscv64.cpp:3630error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...Hunk #1 succeeded at 3541 (offset 3 lines).error: while searching for: return; case 0x1: // SLLIW { unsigned funct7 = (imm12 >> 5) & 0x7f; // SLLIW's instruction code's upper 7 bits have to be equal to zero if (funct7 == 0) { printf("slliw %s, %s, %d\n", rd, rs1, imm12 & 0x1f); // 5 BITS for SHAMT in RISCV64 }error: patch failed: src/coreclr/jit/emitriscv64.cpp:3616error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...Hunk #1 succeeded at 3644 (offset -14 lines).Checking patch src/coreclr/jit/emitriscv64.cpp...Hunk #1 succeeded at 3733 (offset -14 lines).Checking patch src/coreclr/jit/emitriscv64.cpp...error: while searching for: break; case 0x1: // SLLI { static constexpr kSlliFunct6 = 0b000000; unsigned funct6 = (imm12 >> 6) & 0x3f; // SLLI's instruction code's upper 6 bits have to be equal to zeroerror: patch failed: src/coreclr/jit/emitriscv64.cpp:3538error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...error: while searching for: switch (opcode3) { case 0x0: // ADDW return; return; case 0x1: // SLLW printf("sllw %s, %s, %s\n", rd, rs1, rs2); return; case 0x5: // SRLW { return; default: return emitDispIllegalInstruction(code);error: patch failed: src/coreclr/jit/emitriscv64.cpp:3759error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...Hunk #1 succeeded at 3591 (offset 1 line).

@Bajtazar

Copy link
Copy Markdown
ContributorAuthor

Can you please fix the conflicts?

Conflicts have been fixed. Could you please review new changes?

@jakobbotsch
jakobbotsch merged commit d9bc680 into dotnet:mainMay 29, 2024
Ruihan-Yin pushed a commit to Ruihan-Yin/runtime that referenced this pull request May 30, 2024
* [RISC-V] Reworked emitDispInsName a bit to ease further development
* [RISC-V] Little improvements
* [RISC-V] Refactored code
* [RISC-V] Added mv and nop pseudoinstructions to disasm
* [RISC-V] Added branch pseudos to disasm
* [RISC-V] Removed dead code
* [RISC-V] Fixes
* [RISC-V] Added j pseudoinstruction to disasm
* [RISC-V] Improved readability
* [RISC-V] Fixed mov pseudoinstruction
* Revert "[RISC-V] Fixed mov pseudoinstruction"
This reverts commit a011c43.
* [RISC-V] Fixed mov printing name
* [RISC-V] After review changes
* [RISC-V] More fixes after review
* [RISC-V] Adjusted 32-bit shift disasm to changes
* [RISC-V] Fixed bug
* [RISC-V] Fixed comment
* [RISC-V] Changed constants' literal type
* [RISC-V] Added more constants
* [RISC-V] Reinforced printing 1
* [RISC-V] Reinforced printing 2
* [RISC-V] Fixed bug
* [RISC-V] Resolved more bugs
* [RISC-V] Removed dead assert
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Jun 29, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-riscvRelated to the RISC-V architecturearea-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIcommunity-contributionIndicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@Bajtazar@clamp03@risc-vv@tomeksowi@jakobbotsch@sirntar
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

[RISC-V] Add pseudoinstructions to disassembler - #102260

Merged
jakobbotsch merged 25 commits into
dotnet:mainfrom
Bajtazar:riscv-add-pseudo-to-disasm
May 29, 2024
Merged

[RISC-V] Add pseudoinstructions to disassembler#102260
jakobbotsch merged 25 commits into
dotnet:mainfrom
Bajtazar:riscv-add-pseudo-to-disasm

Conversation

@Bajtazar

Copy link
Copy Markdown
Contributor

Adds pseudoinstruction printing to the disassembler. Requested in #102074 (comment)

Part of #84834, cc @dotnet/samsung

@ghostghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label May 15, 2024
@dotnet-policy-servicedotnet-policy-serviceBot added the community-contribution Indicates that the PR has been added by a community member label May 15, 2024
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

@clamp03clamp03 added the arch-riscv Related to the RISC-V architecture label May 15, 2024
Comment threadsrc/coreclr/jit/emitriscv64.cpp
Comment threadsrc/coreclr/jit/emitriscv64.cpp Outdated
Comment threadsrc/coreclr/jit/emitriscv64.cpp Outdated
Comment threadsrc/coreclr/jit/emitriscv64.cpp Outdated
@Bajtazar
Bajtazar requested review from clamp03 and tomeksowiMay 16, 2024 10:47

@clamp03clamp03 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Did you check coreclr test? Could you show some dump examples?

@Bajtazar

Copy link
Copy Markdown
ContributorAuthor

LGTM Did you check coreclr test? Could you show some dump examples?

Tests passes fine

Examples of disassm:

  • mv instruction

Prior

 slli a2, a2,7 addi a2, a2,0 ld a2,0(a2)

New

 slli a2, a2,7 mv a2, a2 ld a2,0(a2)
  • bnezand j instructions

Prior

G_M10072_IG07: ;; offset=0x0064 sltiu a0, s1,65 slli a0, a0,56 srli a0, a0,56 addiw t6, a0,0 bne t6, zero, G_M10072_IG11 jal zero,80

New

G_M10072_IG07: ;; offset=0x0064 sltiu a0, s1,65 slli a0, a0,56 srli a0, a0,56 addiw t6, a0,0 bnez t6, G_M10072_IG11 j 80
  • nop instruction

Prior

G_M55990_IG31: ;; offset=0x1578 addi zero, zero,0

New

G_M55990_IG31: ;; offset=0x1578nop

@clamp03
clamp03 requested review from jakobbotsch and jkotasMay 21, 2024 00:29
@clamp03

Copy link
Copy Markdown
Member

@tomeksowi@jakobbotsch@jkotas Could you review this PR?

Comment threadsrc/coreclr/jit/emitriscv64.cpp Outdated
@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio0-checked: 2718 / 2738 (99.27%)

details

GIT: 6869460


=======================
passed: 2718
failed: 3
skipped: 16
killed: 1
------------------------
TOTAL libs: 2738
TOTAL tests: 2738
REAL time: 36min 26s 575ms
=======================
failed tests
[44.460s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[28.930s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[290.630s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
killed tests
[1810.536s] profiler.eventpipe.reverse_startup.reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio0-checked: 2720 / 2738 (99.34%)

details

GIT: 6869460


=======================
passed: 2720
failed: 2
skipped: 16
killed: 0
------------------------
TOTAL libs: 2738
TOTAL tests: 2738
REAL time: 1h 4min 5s 272ms
=======================
failed tests
[408.370s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[726.860s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio1-checked: 9396 / 9443 (99.50%)

details

GIT: 6869460


=======================
passed: 9396
failed: 4
skipped: 42
killed: 1
------------------------
TOTAL libs: 9443
TOTAL tests: 9443
REAL time: 1h 17min 16s 683ms
=======================
failed tests
[48.630s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[38.310s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[349.840s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[706.940s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
[1800.886s] profiler.eventpipe.reverse_startup.reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio1-checked: 9399 / 9443 (99.53%)

details

GIT: 6869460


=======================
passed: 9399
failed: 2
skipped: 42
killed: 0
------------------------
TOTAL libs: 9443
TOTAL tests: 9443
REAL time: 2h 50min 28s 269ms
=======================
failed tests
[416.290s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[704.320s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@jakobbotschjakobbotsch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please fix the conflicts?

@risc-vv

Copy link
Copy Markdown

RISC-V testing failed on init-build

details

GIT: a4381bd

Cloning into 'runtime'...
Updating files: 16% (9631/58593)
Updating files: 17% (9961/58593)
Updating files: 18% (10547/58593)
Updating files: 19% (11133/58593)
Updating files: 20% (11719/58593)
Updating files: 21% (12305/58593)
Updating files: 22% (12891/58593)
Updating files: 23% (13477/58593)
Updating files: 24% (14063/58593)
Updating files: 25% (14649/58593)
Updating files: 26% (15235/58593)
Updating files: 27% (15821/58593)
Updating files: 28% (16407/58593)
Updating files: 29% (16992/58593)
Updating files: 30% (17578/58593)
Updating files: 31% (18164/58593)
Updating files: 32% (18750/58593)
Updating files: 33% (19336/58593)
Updating files: 34% (19922/58593)
Updating files: 35% (20508/58593)
Updating files: 35% (20968/58593)
Updating files: 36% (21094/58593)
Updating files: 37% (21680/58593)
Updating files: 38% (22266/58593)
Updating files: 39% (22852/58593)
Updating files: 40% (23438/58593)
Updating files: 41% (24024/58593)
Updating files: 42% (24610/58593)
Updating files: 43% (25195/58593)
Updating files: 44% (25781/58593)
Updating files: 45% (26367/58593)
Updating files: 46% (26953/58593)
Updating files: 47% (27539/58593)
Updating files: 48% (28125/58593)
Updating files: 49% (28711/58593)
Updating files: 50% (29297/58593)
Updating files: 51% (29883/58593)
Updating files: 52% (30469/58593)
Updating files: 53% (31055/58593)
Updating files: 54% (31641/58593)
Updating files: 55% (32227/58593)
Updating files: 56% (32813/58593)
Updating files: 57% (33399/58593)
Updating files: 58% (33984/58593)
Updating files: 58% (34531/58593)
Updating files: 59% (34570/58593)
Updating files: 60% (35156/58593)
Updating files: 61% (35742/58593)
Updating files: 62% (36328/58593)
Updating files: 63% (36914/58593)
Updating files: 64% (37500/58593)
Updating files: 65% (38086/58593)
Updating files: 66% (38672/58593)
Updating files: 67% (39258/58593)
Updating files: 68% (39844/58593)
Updating files: 69% (40430/58593)
Updating files: 70% (41016/58593)
Updating files: 71% (41602/58593)
Updating files: 72% (42187/58593)
Updating files: 73% (42773/58593)
Updating files: 74% (43359/58593)
Updating files: 75% (43945/58593)
Updating files: 76% (44531/58593)
Updating files: 77% (45117/58593)
Updating files: 78% (45703/58593)
Updating files: 79% (46289/58593)
Updating files: 80% (46875/58593)
Updating files: 81% (47461/58593)
Updating files: 82% (48047/58593)
Updating files: 83% (48633/58593)
Updating files: 84% (49219/58593)
Updating files: 84% (49312/58593)
Updating files: 85% (49805/58593)
Updating files: 86% (50390/58593)
Updating files: 87% (50976/58593)
Updating files: 88% (51562/58593)
Updating files: 89% (52148/58593)
Updating files: 90% (52734/58593)
Updating files: 91% (53320/58593)
Updating files: 92% (53906/58593)
Updating files: 93% (54492/58593)
Updating files: 94% (55078/58593)
Updating files: 95% (55664/58593)
Updating files: 96% (56250/58593)
Updating files: 97% (56836/58593)
Updating files: 98% (57422/58593)
Updating files: 99% (58008/58593)
Updating files: 100% (58593/58593)
Updating files: 100% (58593/58593), done.
Switched to a new branch 'build-net'
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3506 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3506 (offset 3 lines).
Hunk #2 succeeded at 3555 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3508 (offset 3 lines).
Hunk #2 succeeded at 3532 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3508 (offset 3 lines).
Hunk #2 succeeded at 3570 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3347 (offset 3 lines).
Hunk #2 succeeded at 3413 (offset 3 lines).
Hunk #3 succeeded at 3822 (offset 10 lines).
Checking patch src/coreclr/jit/emitriscv64.h...
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3825 (offset 10 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3347 (offset 3 lines).
Hunk #2 succeeded at 3367 (offset 3 lines).
Hunk #3 succeeded at 3457 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3478 (offset 3 lines).
Hunk #2 succeeded at 3516 (offset 3 lines).
Hunk #3 succeeded at 3822 (offset 10 lines).
Hunk #4 succeeded at 3901 (offset 10 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3428 (offset 3 lines).
Hunk #2 succeeded at 3531 (offset 3 lines).
Hunk #3 succeeded at 3908 (offset 10 lines).
Checking patch src/coreclr/jit/codegenriscv64.cpp...
Checking patch src/coreclr/jit/emitriscv64.cpp...
error: while searching for:
{
code_t code = emitInsCode(ins);if (INS_mov == ins)
{
assert(isGeneralRegisterOrR0(reg1));
assert(isGeneralRegisterOrR0(reg2));
error: patch failed: src/coreclr/jit/emitriscv64.cpp:588
error: src/coreclr/jit/emitriscv64.cpp: patch does not apply
Checking patch src/coreclr/jit/instrsriscv64.h...
error: while searching for:
INST(nop, "nop", 0, 0x00000013)
//// R_R
INST(mov, "mov", 0, 0x00000013)
////R_I
INST(lui, "lui", 0, 0x00000037)
error: patch failed: src/coreclr/jit/instrsriscv64.h:35
error: src/coreclr/jit/instrsriscv64.h: patch does not apply
Checking patch src/coreclr/jit/codegenriscv64.cpp...
Checking patch src/coreclr/jit/emitriscv64.cpp...
error: while searching for:
inline bool emitter::emitInsMayWriteToGCReg(instruction ins)
{
assert(ins != INS_invalid);return (ins <= INS_remuw) && (ins >= INS_mv) &&!(ins >= INS_jal && ins <= INS_bgeu && ins != INS_jalr) &&
(CodeGenInterface::instInfo[ins] & ST) == 0
?true:false;
error: patch failed: src/coreclr/jit/emitriscv64.cpp:141
error: src/coreclr/jit/emitriscv64.cpp: patch does not apply
Checking patch src/coreclr/jit/instrsriscv64.h...
error: while searching for:
INST(nop, "nop", 0, 0x00000013)
//// R_R
INST(mv, "mv", 0, 0x00000013)
////R_I
INST(lui, "lui", 0, 0x00000037)
error: patch failed: src/coreclr/jit/instrsriscv64.h:35
error: src/coreclr/jit/instrsriscv64.h: patch does not apply
Checking patch src/coreclr/jit/instrsriscv64.h...
error: while searching for:
INST(nop, "nop", 0, 0x00000013)
//// R_R
INST(mov, "mov", 0, 0x00000013)
////R_I
INST(lui, "lui", 0, 0x00000037)
error: patch failed: src/coreclr/jit/instrsriscv64.h:35
error: src/coreclr/jit/instrsriscv64.h: patch does not apply
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3360 (offset 3 lines).
Hunk #2 succeeded at 3373 (offset 3 lines).
Hunk #3 succeeded at 3524 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3540 (offset 3 lines).
Hunk #2 succeeded at 3562 (offset 3 lines).
Hunk #3 succeeded at 3587 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
error: while searching for:
case 0x0: // ADDIW
printf("addiw %s, %s, %d\n", rd, rs1, imm12);return;case 0x1: // SLLIW
printf("slliw %s, %s, %d\n", rd, rs1, imm12 & 0x3f); // 6 BITS forSHAMTin RISCV64
return;case 0x5: // SRLIW & SRAIW
if(((code >>30) &0x1) ==0) { printf("srliw %s, %s, %d\n", rd, rs1, imm12 & 0x1f); // 5BITS for SHAMT in RISCV64 } else { printf("sraiw %s, %s, %d\n", rd, rs1, imm12 & 0x1f); // 5BITS for SHAMT in RISCV64 } return; default: printf("RISCV64 illegal instruction: 0x%08X\n", code); return; } } case 0x33:error: patch failed: src/coreclr/jit/emitriscv64.cpp:3614error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...error: while searching for: case 0x5: // SRLIW & SRAIW { static constexpr unsigned kLogicalShiftFunct7 = 0x00; static constexpr unsigned kArithmeticShiftFunct7 = 0x30; unsigned funct7 = (imm12 >> 5) & 0x7f; if (funct7 == kLogicalShiftFunct7)error: patch failed: src/coreclr/jit/emitriscv64.cpp:3631error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...error: while searching for: case 0x1: // SLLIW { unsigned funct7 = (imm12 >> 5) & 0x7f; // SLLI's instruction code's upper 7 bits have to be equal to zero if (funct7 == 0) { printf("slliw %s, %s, %d\n", rd, rs1, imm12 & 0x1f); // 5 BITS for SHAMT in RISCV64error: patch failed: src/coreclr/jit/emitriscv64.cpp:3617error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...Hunk #1 succeeded at 3563 (offset 3 lines).error: while searching for: return; case 0x5: // SRLIW & SRAIW { static constexpr unsigned kLogicalShiftFunct7 = 0x00; static constexpr unsigned kArithmeticShiftFunct7 = 0x20; unsigned funct7 = (imm12 >> 5) & 0x7f; if (funct7 == kLogicalShiftFunct7)error: patch failed: src/coreclr/jit/emitriscv64.cpp:3630error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...Hunk #1 succeeded at 3541 (offset 3 lines).error: while searching for: return; case 0x1: // SLLIW { unsigned funct7 = (imm12 >> 5) & 0x7f; // SLLIW's instruction code's upper 7 bits have to be equal to zero if (funct7 == 0) { printf("slliw %s, %s, %d\n", rd, rs1, imm12 & 0x1f); // 5 BITS for SHAMT in RISCV64 }error: patch failed: src/coreclr/jit/emitriscv64.cpp:3616error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...Hunk #1 succeeded at 3644 (offset -14 lines).Checking patch src/coreclr/jit/emitriscv64.cpp...Hunk #1 succeeded at 3733 (offset -14 lines).Checking patch src/coreclr/jit/emitriscv64.cpp...error: while searching for: break; case 0x1: // SLLI { static constexpr kSlliFunct6 = 0b000000; unsigned funct6 = (imm12 >> 6) & 0x3f; // SLLI's instruction code's upper 6 bits have to be equal to zeroerror: patch failed: src/coreclr/jit/emitriscv64.cpp:3538error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...error: while searching for: switch (opcode3) { case 0x0: // ADDW return; return; case 0x1: // SLLW printf("sllw %s, %s, %s\n", rd, rs1, rs2); return; case 0x5: // SRLW { return; default: return emitDispIllegalInstruction(code);error: patch failed: src/coreclr/jit/emitriscv64.cpp:3759error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...Hunk #1 succeeded at 3591 (offset 1 line).

@Bajtazar

Copy link
Copy Markdown
ContributorAuthor

Can you please fix the conflicts?

Conflicts have been fixed. Could you please review new changes?

@jakobbotsch
jakobbotsch merged commit d9bc680 into dotnet:mainMay 29, 2024
Ruihan-Yin pushed a commit to Ruihan-Yin/runtime that referenced this pull request May 30, 2024
* [RISC-V] Reworked emitDispInsName a bit to ease further development
* [RISC-V] Little improvements
* [RISC-V] Refactored code
* [RISC-V] Added mv and nop pseudoinstructions to disasm
* [RISC-V] Added branch pseudos to disasm
* [RISC-V] Removed dead code
* [RISC-V] Fixes
* [RISC-V] Added j pseudoinstruction to disasm
* [RISC-V] Improved readability
* [RISC-V] Fixed mov pseudoinstruction
* Revert "[RISC-V] Fixed mov pseudoinstruction"
This reverts commit a011c43.
* [RISC-V] Fixed mov printing name
* [RISC-V] After review changes
* [RISC-V] More fixes after review
* [RISC-V] Adjusted 32-bit shift disasm to changes
* [RISC-V] Fixed bug
* [RISC-V] Fixed comment
* [RISC-V] Changed constants' literal type
* [RISC-V] Added more constants
* [RISC-V] Reinforced printing 1
* [RISC-V] Reinforced printing 2
* [RISC-V] Fixed bug
* [RISC-V] Resolved more bugs
* [RISC-V] Removed dead assert
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Jun 29, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-riscvRelated to the RISC-V architecturearea-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIcommunity-contributionIndicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@Bajtazar@clamp03@risc-vv@tomeksowi@jakobbotsch@sirntar
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

[RISC-V] Add pseudoinstructions to disassembler - #102260

Merged
jakobbotsch merged 25 commits into
dotnet:mainfrom
Bajtazar:riscv-add-pseudo-to-disasm
May 29, 2024
Merged

[RISC-V] Add pseudoinstructions to disassembler#102260
jakobbotsch merged 25 commits into
dotnet:mainfrom
Bajtazar:riscv-add-pseudo-to-disasm

Conversation

@Bajtazar

Copy link
Copy Markdown
Contributor

Adds pseudoinstruction printing to the disassembler. Requested in #102074 (comment)

Part of #84834, cc @dotnet/samsung

@ghostghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label May 15, 2024
@dotnet-policy-servicedotnet-policy-serviceBot added the community-contribution Indicates that the PR has been added by a community member label May 15, 2024
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

@clamp03clamp03 added the arch-riscv Related to the RISC-V architecture label May 15, 2024
Comment threadsrc/coreclr/jit/emitriscv64.cpp
Comment threadsrc/coreclr/jit/emitriscv64.cpp Outdated
Comment threadsrc/coreclr/jit/emitriscv64.cpp Outdated
Comment threadsrc/coreclr/jit/emitriscv64.cpp Outdated
@Bajtazar
Bajtazar requested review from clamp03 and tomeksowiMay 16, 2024 10:47

@clamp03clamp03 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Did you check coreclr test? Could you show some dump examples?

@Bajtazar

Copy link
Copy Markdown
ContributorAuthor

LGTM Did you check coreclr test? Could you show some dump examples?

Tests passes fine

Examples of disassm:

  • mv instruction

Prior

 slli a2, a2,7 addi a2, a2,0 ld a2,0(a2)

New

 slli a2, a2,7 mv a2, a2 ld a2,0(a2)
  • bnezand j instructions

Prior

G_M10072_IG07: ;; offset=0x0064 sltiu a0, s1,65 slli a0, a0,56 srli a0, a0,56 addiw t6, a0,0 bne t6, zero, G_M10072_IG11 jal zero,80

New

G_M10072_IG07: ;; offset=0x0064 sltiu a0, s1,65 slli a0, a0,56 srli a0, a0,56 addiw t6, a0,0 bnez t6, G_M10072_IG11 j 80
  • nop instruction

Prior

G_M55990_IG31: ;; offset=0x1578 addi zero, zero,0

New

G_M55990_IG31: ;; offset=0x1578nop

@clamp03
clamp03 requested review from jakobbotsch and jkotasMay 21, 2024 00:29
@clamp03

Copy link
Copy Markdown
Member

@tomeksowi@jakobbotsch@jkotas Could you review this PR?

Comment threadsrc/coreclr/jit/emitriscv64.cpp Outdated
@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio0-checked: 2718 / 2738 (99.27%)

details

GIT: 6869460


=======================
passed: 2718
failed: 3
skipped: 16
killed: 1
------------------------
TOTAL libs: 2738
TOTAL tests: 2738
REAL time: 36min 26s 575ms
=======================
failed tests
[44.460s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[28.930s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[290.630s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
killed tests
[1810.536s] profiler.eventpipe.reverse_startup.reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio0-checked: 2720 / 2738 (99.34%)

details

GIT: 6869460


=======================
passed: 2720
failed: 2
skipped: 16
killed: 0
------------------------
TOTAL libs: 2738
TOTAL tests: 2738
REAL time: 1h 4min 5s 272ms
=======================
failed tests
[408.370s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[726.860s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio1-checked: 9396 / 9443 (99.50%)

details

GIT: 6869460


=======================
passed: 9396
failed: 4
skipped: 42
killed: 1
------------------------
TOTAL libs: 9443
TOTAL tests: 9443
REAL time: 1h 17min 16s 683ms
=======================
failed tests
[48.630s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[38.310s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[349.840s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[706.940s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
[1800.886s] profiler.eventpipe.reverse_startup.reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio1-checked: 9399 / 9443 (99.53%)

details

GIT: 6869460


=======================
passed: 9399
failed: 2
skipped: 42
killed: 0
------------------------
TOTAL libs: 9443
TOTAL tests: 9443
REAL time: 2h 50min 28s 269ms
=======================
failed tests
[416.290s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[704.320s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@jakobbotschjakobbotsch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please fix the conflicts?

@risc-vv

Copy link
Copy Markdown

RISC-V testing failed on init-build

details

GIT: a4381bd

Cloning into 'runtime'...
Updating files: 16% (9631/58593)
Updating files: 17% (9961/58593)
Updating files: 18% (10547/58593)
Updating files: 19% (11133/58593)
Updating files: 20% (11719/58593)
Updating files: 21% (12305/58593)
Updating files: 22% (12891/58593)
Updating files: 23% (13477/58593)
Updating files: 24% (14063/58593)
Updating files: 25% (14649/58593)
Updating files: 26% (15235/58593)
Updating files: 27% (15821/58593)
Updating files: 28% (16407/58593)
Updating files: 29% (16992/58593)
Updating files: 30% (17578/58593)
Updating files: 31% (18164/58593)
Updating files: 32% (18750/58593)
Updating files: 33% (19336/58593)
Updating files: 34% (19922/58593)
Updating files: 35% (20508/58593)
Updating files: 35% (20968/58593)
Updating files: 36% (21094/58593)
Updating files: 37% (21680/58593)
Updating files: 38% (22266/58593)
Updating files: 39% (22852/58593)
Updating files: 40% (23438/58593)
Updating files: 41% (24024/58593)
Updating files: 42% (24610/58593)
Updating files: 43% (25195/58593)
Updating files: 44% (25781/58593)
Updating files: 45% (26367/58593)
Updating files: 46% (26953/58593)
Updating files: 47% (27539/58593)
Updating files: 48% (28125/58593)
Updating files: 49% (28711/58593)
Updating files: 50% (29297/58593)
Updating files: 51% (29883/58593)
Updating files: 52% (30469/58593)
Updating files: 53% (31055/58593)
Updating files: 54% (31641/58593)
Updating files: 55% (32227/58593)
Updating files: 56% (32813/58593)
Updating files: 57% (33399/58593)
Updating files: 58% (33984/58593)
Updating files: 58% (34531/58593)
Updating files: 59% (34570/58593)
Updating files: 60% (35156/58593)
Updating files: 61% (35742/58593)
Updating files: 62% (36328/58593)
Updating files: 63% (36914/58593)
Updating files: 64% (37500/58593)
Updating files: 65% (38086/58593)
Updating files: 66% (38672/58593)
Updating files: 67% (39258/58593)
Updating files: 68% (39844/58593)
Updating files: 69% (40430/58593)
Updating files: 70% (41016/58593)
Updating files: 71% (41602/58593)
Updating files: 72% (42187/58593)
Updating files: 73% (42773/58593)
Updating files: 74% (43359/58593)
Updating files: 75% (43945/58593)
Updating files: 76% (44531/58593)
Updating files: 77% (45117/58593)
Updating files: 78% (45703/58593)
Updating files: 79% (46289/58593)
Updating files: 80% (46875/58593)
Updating files: 81% (47461/58593)
Updating files: 82% (48047/58593)
Updating files: 83% (48633/58593)
Updating files: 84% (49219/58593)
Updating files: 84% (49312/58593)
Updating files: 85% (49805/58593)
Updating files: 86% (50390/58593)
Updating files: 87% (50976/58593)
Updating files: 88% (51562/58593)
Updating files: 89% (52148/58593)
Updating files: 90% (52734/58593)
Updating files: 91% (53320/58593)
Updating files: 92% (53906/58593)
Updating files: 93% (54492/58593)
Updating files: 94% (55078/58593)
Updating files: 95% (55664/58593)
Updating files: 96% (56250/58593)
Updating files: 97% (56836/58593)
Updating files: 98% (57422/58593)
Updating files: 99% (58008/58593)
Updating files: 100% (58593/58593)
Updating files: 100% (58593/58593), done.
Switched to a new branch 'build-net'
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3506 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3506 (offset 3 lines).
Hunk #2 succeeded at 3555 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3508 (offset 3 lines).
Hunk #2 succeeded at 3532 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3508 (offset 3 lines).
Hunk #2 succeeded at 3570 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3347 (offset 3 lines).
Hunk #2 succeeded at 3413 (offset 3 lines).
Hunk #3 succeeded at 3822 (offset 10 lines).
Checking patch src/coreclr/jit/emitriscv64.h...
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3825 (offset 10 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3347 (offset 3 lines).
Hunk #2 succeeded at 3367 (offset 3 lines).
Hunk #3 succeeded at 3457 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3478 (offset 3 lines).
Hunk #2 succeeded at 3516 (offset 3 lines).
Hunk #3 succeeded at 3822 (offset 10 lines).
Hunk #4 succeeded at 3901 (offset 10 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3428 (offset 3 lines).
Hunk #2 succeeded at 3531 (offset 3 lines).
Hunk #3 succeeded at 3908 (offset 10 lines).
Checking patch src/coreclr/jit/codegenriscv64.cpp...
Checking patch src/coreclr/jit/emitriscv64.cpp...
error: while searching for:
{
code_t code = emitInsCode(ins);if (INS_mov == ins)
{
assert(isGeneralRegisterOrR0(reg1));
assert(isGeneralRegisterOrR0(reg2));
error: patch failed: src/coreclr/jit/emitriscv64.cpp:588
error: src/coreclr/jit/emitriscv64.cpp: patch does not apply
Checking patch src/coreclr/jit/instrsriscv64.h...
error: while searching for:
INST(nop, "nop", 0, 0x00000013)
//// R_R
INST(mov, "mov", 0, 0x00000013)
////R_I
INST(lui, "lui", 0, 0x00000037)
error: patch failed: src/coreclr/jit/instrsriscv64.h:35
error: src/coreclr/jit/instrsriscv64.h: patch does not apply
Checking patch src/coreclr/jit/codegenriscv64.cpp...
Checking patch src/coreclr/jit/emitriscv64.cpp...
error: while searching for:
inline bool emitter::emitInsMayWriteToGCReg(instruction ins)
{
assert(ins != INS_invalid);return (ins <= INS_remuw) && (ins >= INS_mv) &&!(ins >= INS_jal && ins <= INS_bgeu && ins != INS_jalr) &&
(CodeGenInterface::instInfo[ins] & ST) == 0
?true:false;
error: patch failed: src/coreclr/jit/emitriscv64.cpp:141
error: src/coreclr/jit/emitriscv64.cpp: patch does not apply
Checking patch src/coreclr/jit/instrsriscv64.h...
error: while searching for:
INST(nop, "nop", 0, 0x00000013)
//// R_R
INST(mv, "mv", 0, 0x00000013)
////R_I
INST(lui, "lui", 0, 0x00000037)
error: patch failed: src/coreclr/jit/instrsriscv64.h:35
error: src/coreclr/jit/instrsriscv64.h: patch does not apply
Checking patch src/coreclr/jit/instrsriscv64.h...
error: while searching for:
INST(nop, "nop", 0, 0x00000013)
//// R_R
INST(mov, "mov", 0, 0x00000013)
////R_I
INST(lui, "lui", 0, 0x00000037)
error: patch failed: src/coreclr/jit/instrsriscv64.h:35
error: src/coreclr/jit/instrsriscv64.h: patch does not apply
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3360 (offset 3 lines).
Hunk #2 succeeded at 3373 (offset 3 lines).
Hunk #3 succeeded at 3524 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3540 (offset 3 lines).
Hunk #2 succeeded at 3562 (offset 3 lines).
Hunk #3 succeeded at 3587 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
error: while searching for:
case 0x0: // ADDIW
printf("addiw %s, %s, %d\n", rd, rs1, imm12);return;case 0x1: // SLLIW
printf("slliw %s, %s, %d\n", rd, rs1, imm12 & 0x3f); // 6 BITS forSHAMTin RISCV64
return;case 0x5: // SRLIW & SRAIW
if(((code >>30) &0x1) ==0) { printf("srliw %s, %s, %d\n", rd, rs1, imm12 & 0x1f); // 5BITS for SHAMT in RISCV64 } else { printf("sraiw %s, %s, %d\n", rd, rs1, imm12 & 0x1f); // 5BITS for SHAMT in RISCV64 } return; default: printf("RISCV64 illegal instruction: 0x%08X\n", code); return; } } case 0x33:error: patch failed: src/coreclr/jit/emitriscv64.cpp:3614error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...error: while searching for: case 0x5: // SRLIW & SRAIW { static constexpr unsigned kLogicalShiftFunct7 = 0x00; static constexpr unsigned kArithmeticShiftFunct7 = 0x30; unsigned funct7 = (imm12 >> 5) & 0x7f; if (funct7 == kLogicalShiftFunct7)error: patch failed: src/coreclr/jit/emitriscv64.cpp:3631error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...error: while searching for: case 0x1: // SLLIW { unsigned funct7 = (imm12 >> 5) & 0x7f; // SLLI's instruction code's upper 7 bits have to be equal to zero if (funct7 == 0) { printf("slliw %s, %s, %d\n", rd, rs1, imm12 & 0x1f); // 5 BITS for SHAMT in RISCV64error: patch failed: src/coreclr/jit/emitriscv64.cpp:3617error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...Hunk #1 succeeded at 3563 (offset 3 lines).error: while searching for: return; case 0x5: // SRLIW & SRAIW { static constexpr unsigned kLogicalShiftFunct7 = 0x00; static constexpr unsigned kArithmeticShiftFunct7 = 0x20; unsigned funct7 = (imm12 >> 5) & 0x7f; if (funct7 == kLogicalShiftFunct7)error: patch failed: src/coreclr/jit/emitriscv64.cpp:3630error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...Hunk #1 succeeded at 3541 (offset 3 lines).error: while searching for: return; case 0x1: // SLLIW { unsigned funct7 = (imm12 >> 5) & 0x7f; // SLLIW's instruction code's upper 7 bits have to be equal to zero if (funct7 == 0) { printf("slliw %s, %s, %d\n", rd, rs1, imm12 & 0x1f); // 5 BITS for SHAMT in RISCV64 }error: patch failed: src/coreclr/jit/emitriscv64.cpp:3616error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...Hunk #1 succeeded at 3644 (offset -14 lines).Checking patch src/coreclr/jit/emitriscv64.cpp...Hunk #1 succeeded at 3733 (offset -14 lines).Checking patch src/coreclr/jit/emitriscv64.cpp...error: while searching for: break; case 0x1: // SLLI { static constexpr kSlliFunct6 = 0b000000; unsigned funct6 = (imm12 >> 6) & 0x3f; // SLLI's instruction code's upper 6 bits have to be equal to zeroerror: patch failed: src/coreclr/jit/emitriscv64.cpp:3538error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...error: while searching for: switch (opcode3) { case 0x0: // ADDW return; return; case 0x1: // SLLW printf("sllw %s, %s, %s\n", rd, rs1, rs2); return; case 0x5: // SRLW { return; default: return emitDispIllegalInstruction(code);error: patch failed: src/coreclr/jit/emitriscv64.cpp:3759error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...Hunk #1 succeeded at 3591 (offset 1 line).

@Bajtazar

Copy link
Copy Markdown
ContributorAuthor

Can you please fix the conflicts?

Conflicts have been fixed. Could you please review new changes?

@jakobbotsch
jakobbotsch merged commit d9bc680 into dotnet:mainMay 29, 2024
Ruihan-Yin pushed a commit to Ruihan-Yin/runtime that referenced this pull request May 30, 2024
* [RISC-V] Reworked emitDispInsName a bit to ease further development
* [RISC-V] Little improvements
* [RISC-V] Refactored code
* [RISC-V] Added mv and nop pseudoinstructions to disasm
* [RISC-V] Added branch pseudos to disasm
* [RISC-V] Removed dead code
* [RISC-V] Fixes
* [RISC-V] Added j pseudoinstruction to disasm
* [RISC-V] Improved readability
* [RISC-V] Fixed mov pseudoinstruction
* Revert "[RISC-V] Fixed mov pseudoinstruction"
This reverts commit a011c43.
* [RISC-V] Fixed mov printing name
* [RISC-V] After review changes
* [RISC-V] More fixes after review
* [RISC-V] Adjusted 32-bit shift disasm to changes
* [RISC-V] Fixed bug
* [RISC-V] Fixed comment
* [RISC-V] Changed constants' literal type
* [RISC-V] Added more constants
* [RISC-V] Reinforced printing 1
* [RISC-V] Reinforced printing 2
* [RISC-V] Fixed bug
* [RISC-V] Resolved more bugs
* [RISC-V] Removed dead assert
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Jun 29, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-riscvRelated to the RISC-V architecturearea-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIcommunity-contributionIndicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@Bajtazar@clamp03@risc-vv@tomeksowi@jakobbotsch@sirntar
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

[RISC-V] Add pseudoinstructions to disassembler - #102260

Merged
jakobbotsch merged 25 commits into
dotnet:mainfrom
Bajtazar:riscv-add-pseudo-to-disasm
May 29, 2024
Merged

[RISC-V] Add pseudoinstructions to disassembler#102260
jakobbotsch merged 25 commits into
dotnet:mainfrom
Bajtazar:riscv-add-pseudo-to-disasm

Conversation

@Bajtazar

Copy link
Copy Markdown
Contributor

Adds pseudoinstruction printing to the disassembler. Requested in #102074 (comment)

Part of #84834, cc @dotnet/samsung

@ghostghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label May 15, 2024
@dotnet-policy-servicedotnet-policy-serviceBot added the community-contribution Indicates that the PR has been added by a community member label May 15, 2024
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

@clamp03clamp03 added the arch-riscv Related to the RISC-V architecture label May 15, 2024
Comment threadsrc/coreclr/jit/emitriscv64.cpp
Comment threadsrc/coreclr/jit/emitriscv64.cpp Outdated
Comment threadsrc/coreclr/jit/emitriscv64.cpp Outdated
Comment threadsrc/coreclr/jit/emitriscv64.cpp Outdated
@Bajtazar
Bajtazar requested review from clamp03 and tomeksowiMay 16, 2024 10:47

@clamp03clamp03 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Did you check coreclr test? Could you show some dump examples?

@Bajtazar

Copy link
Copy Markdown
ContributorAuthor

LGTM Did you check coreclr test? Could you show some dump examples?

Tests passes fine

Examples of disassm:

  • mv instruction

Prior

 slli a2, a2,7 addi a2, a2,0 ld a2,0(a2)

New

 slli a2, a2,7 mv a2, a2 ld a2,0(a2)
  • bnezand j instructions

Prior

G_M10072_IG07: ;; offset=0x0064 sltiu a0, s1,65 slli a0, a0,56 srli a0, a0,56 addiw t6, a0,0 bne t6, zero, G_M10072_IG11 jal zero,80

New

G_M10072_IG07: ;; offset=0x0064 sltiu a0, s1,65 slli a0, a0,56 srli a0, a0,56 addiw t6, a0,0 bnez t6, G_M10072_IG11 j 80
  • nop instruction

Prior

G_M55990_IG31: ;; offset=0x1578 addi zero, zero,0

New

G_M55990_IG31: ;; offset=0x1578nop

@clamp03
clamp03 requested review from jakobbotsch and jkotasMay 21, 2024 00:29
@clamp03

Copy link
Copy Markdown
Member

@tomeksowi@jakobbotsch@jkotas Could you review this PR?

Comment threadsrc/coreclr/jit/emitriscv64.cpp Outdated
@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio0-checked: 2718 / 2738 (99.27%)

details

GIT: 6869460


=======================
passed: 2718
failed: 3
skipped: 16
killed: 1
------------------------
TOTAL libs: 2738
TOTAL tests: 2738
REAL time: 36min 26s 575ms
=======================
failed tests
[44.460s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[28.930s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[290.630s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
killed tests
[1810.536s] profiler.eventpipe.reverse_startup.reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio0-checked: 2720 / 2738 (99.34%)

details

GIT: 6869460


=======================
passed: 2720
failed: 2
skipped: 16
killed: 0
------------------------
TOTAL libs: 2738
TOTAL tests: 2738
REAL time: 1h 4min 5s 272ms
=======================
failed tests
[408.370s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[726.860s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio1-checked: 9396 / 9443 (99.50%)

details

GIT: 6869460


=======================
passed: 9396
failed: 4
skipped: 42
killed: 1
------------------------
TOTAL libs: 9443
TOTAL tests: 9443
REAL time: 1h 17min 16s 683ms
=======================
failed tests
[48.630s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[38.310s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[349.840s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[706.940s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
[1800.886s] profiler.eventpipe.reverse_startup.reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio1-checked: 9399 / 9443 (99.53%)

details

GIT: 6869460


=======================
passed: 9399
failed: 2
skipped: 42
killed: 0
------------------------
TOTAL libs: 9443
TOTAL tests: 9443
REAL time: 2h 50min 28s 269ms
=======================
failed tests
[416.290s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[704.320s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@jakobbotschjakobbotsch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please fix the conflicts?

@risc-vv

Copy link
Copy Markdown

RISC-V testing failed on init-build

details

GIT: a4381bd

Cloning into 'runtime'...
Updating files: 16% (9631/58593)
Updating files: 17% (9961/58593)
Updating files: 18% (10547/58593)
Updating files: 19% (11133/58593)
Updating files: 20% (11719/58593)
Updating files: 21% (12305/58593)
Updating files: 22% (12891/58593)
Updating files: 23% (13477/58593)
Updating files: 24% (14063/58593)
Updating files: 25% (14649/58593)
Updating files: 26% (15235/58593)
Updating files: 27% (15821/58593)
Updating files: 28% (16407/58593)
Updating files: 29% (16992/58593)
Updating files: 30% (17578/58593)
Updating files: 31% (18164/58593)
Updating files: 32% (18750/58593)
Updating files: 33% (19336/58593)
Updating files: 34% (19922/58593)
Updating files: 35% (20508/58593)
Updating files: 35% (20968/58593)
Updating files: 36% (21094/58593)
Updating files: 37% (21680/58593)
Updating files: 38% (22266/58593)
Updating files: 39% (22852/58593)
Updating files: 40% (23438/58593)
Updating files: 41% (24024/58593)
Updating files: 42% (24610/58593)
Updating files: 43% (25195/58593)
Updating files: 44% (25781/58593)
Updating files: 45% (26367/58593)
Updating files: 46% (26953/58593)
Updating files: 47% (27539/58593)
Updating files: 48% (28125/58593)
Updating files: 49% (28711/58593)
Updating files: 50% (29297/58593)
Updating files: 51% (29883/58593)
Updating files: 52% (30469/58593)
Updating files: 53% (31055/58593)
Updating files: 54% (31641/58593)
Updating files: 55% (32227/58593)
Updating files: 56% (32813/58593)
Updating files: 57% (33399/58593)
Updating files: 58% (33984/58593)
Updating files: 58% (34531/58593)
Updating files: 59% (34570/58593)
Updating files: 60% (35156/58593)
Updating files: 61% (35742/58593)
Updating files: 62% (36328/58593)
Updating files: 63% (36914/58593)
Updating files: 64% (37500/58593)
Updating files: 65% (38086/58593)
Updating files: 66% (38672/58593)
Updating files: 67% (39258/58593)
Updating files: 68% (39844/58593)
Updating files: 69% (40430/58593)
Updating files: 70% (41016/58593)
Updating files: 71% (41602/58593)
Updating files: 72% (42187/58593)
Updating files: 73% (42773/58593)
Updating files: 74% (43359/58593)
Updating files: 75% (43945/58593)
Updating files: 76% (44531/58593)
Updating files: 77% (45117/58593)
Updating files: 78% (45703/58593)
Updating files: 79% (46289/58593)
Updating files: 80% (46875/58593)
Updating files: 81% (47461/58593)
Updating files: 82% (48047/58593)
Updating files: 83% (48633/58593)
Updating files: 84% (49219/58593)
Updating files: 84% (49312/58593)
Updating files: 85% (49805/58593)
Updating files: 86% (50390/58593)
Updating files: 87% (50976/58593)
Updating files: 88% (51562/58593)
Updating files: 89% (52148/58593)
Updating files: 90% (52734/58593)
Updating files: 91% (53320/58593)
Updating files: 92% (53906/58593)
Updating files: 93% (54492/58593)
Updating files: 94% (55078/58593)
Updating files: 95% (55664/58593)
Updating files: 96% (56250/58593)
Updating files: 97% (56836/58593)
Updating files: 98% (57422/58593)
Updating files: 99% (58008/58593)
Updating files: 100% (58593/58593)
Updating files: 100% (58593/58593), done.
Switched to a new branch 'build-net'
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3506 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3506 (offset 3 lines).
Hunk #2 succeeded at 3555 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3508 (offset 3 lines).
Hunk #2 succeeded at 3532 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3508 (offset 3 lines).
Hunk #2 succeeded at 3570 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3347 (offset 3 lines).
Hunk #2 succeeded at 3413 (offset 3 lines).
Hunk #3 succeeded at 3822 (offset 10 lines).
Checking patch src/coreclr/jit/emitriscv64.h...
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3825 (offset 10 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3347 (offset 3 lines).
Hunk #2 succeeded at 3367 (offset 3 lines).
Hunk #3 succeeded at 3457 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3478 (offset 3 lines).
Hunk #2 succeeded at 3516 (offset 3 lines).
Hunk #3 succeeded at 3822 (offset 10 lines).
Hunk #4 succeeded at 3901 (offset 10 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3428 (offset 3 lines).
Hunk #2 succeeded at 3531 (offset 3 lines).
Hunk #3 succeeded at 3908 (offset 10 lines).
Checking patch src/coreclr/jit/codegenriscv64.cpp...
Checking patch src/coreclr/jit/emitriscv64.cpp...
error: while searching for:
{
code_t code = emitInsCode(ins);if (INS_mov == ins)
{
assert(isGeneralRegisterOrR0(reg1));
assert(isGeneralRegisterOrR0(reg2));
error: patch failed: src/coreclr/jit/emitriscv64.cpp:588
error: src/coreclr/jit/emitriscv64.cpp: patch does not apply
Checking patch src/coreclr/jit/instrsriscv64.h...
error: while searching for:
INST(nop, "nop", 0, 0x00000013)
//// R_R
INST(mov, "mov", 0, 0x00000013)
////R_I
INST(lui, "lui", 0, 0x00000037)
error: patch failed: src/coreclr/jit/instrsriscv64.h:35
error: src/coreclr/jit/instrsriscv64.h: patch does not apply
Checking patch src/coreclr/jit/codegenriscv64.cpp...
Checking patch src/coreclr/jit/emitriscv64.cpp...
error: while searching for:
inline bool emitter::emitInsMayWriteToGCReg(instruction ins)
{
assert(ins != INS_invalid);return (ins <= INS_remuw) && (ins >= INS_mv) &&!(ins >= INS_jal && ins <= INS_bgeu && ins != INS_jalr) &&
(CodeGenInterface::instInfo[ins] & ST) == 0
?true:false;
error: patch failed: src/coreclr/jit/emitriscv64.cpp:141
error: src/coreclr/jit/emitriscv64.cpp: patch does not apply
Checking patch src/coreclr/jit/instrsriscv64.h...
error: while searching for:
INST(nop, "nop", 0, 0x00000013)
//// R_R
INST(mv, "mv", 0, 0x00000013)
////R_I
INST(lui, "lui", 0, 0x00000037)
error: patch failed: src/coreclr/jit/instrsriscv64.h:35
error: src/coreclr/jit/instrsriscv64.h: patch does not apply
Checking patch src/coreclr/jit/instrsriscv64.h...
error: while searching for:
INST(nop, "nop", 0, 0x00000013)
//// R_R
INST(mov, "mov", 0, 0x00000013)
////R_I
INST(lui, "lui", 0, 0x00000037)
error: patch failed: src/coreclr/jit/instrsriscv64.h:35
error: src/coreclr/jit/instrsriscv64.h: patch does not apply
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3360 (offset 3 lines).
Hunk #2 succeeded at 3373 (offset 3 lines).
Hunk #3 succeeded at 3524 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3540 (offset 3 lines).
Hunk #2 succeeded at 3562 (offset 3 lines).
Hunk #3 succeeded at 3587 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
error: while searching for:
case 0x0: // ADDIW
printf("addiw %s, %s, %d\n", rd, rs1, imm12);return;case 0x1: // SLLIW
printf("slliw %s, %s, %d\n", rd, rs1, imm12 & 0x3f); // 6 BITS forSHAMTin RISCV64
return;case 0x5: // SRLIW & SRAIW
if(((code >>30) &0x1) ==0) { printf("srliw %s, %s, %d\n", rd, rs1, imm12 & 0x1f); // 5BITS for SHAMT in RISCV64 } else { printf("sraiw %s, %s, %d\n", rd, rs1, imm12 & 0x1f); // 5BITS for SHAMT in RISCV64 } return; default: printf("RISCV64 illegal instruction: 0x%08X\n", code); return; } } case 0x33:error: patch failed: src/coreclr/jit/emitriscv64.cpp:3614error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...error: while searching for: case 0x5: // SRLIW & SRAIW { static constexpr unsigned kLogicalShiftFunct7 = 0x00; static constexpr unsigned kArithmeticShiftFunct7 = 0x30; unsigned funct7 = (imm12 >> 5) & 0x7f; if (funct7 == kLogicalShiftFunct7)error: patch failed: src/coreclr/jit/emitriscv64.cpp:3631error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...error: while searching for: case 0x1: // SLLIW { unsigned funct7 = (imm12 >> 5) & 0x7f; // SLLI's instruction code's upper 7 bits have to be equal to zero if (funct7 == 0) { printf("slliw %s, %s, %d\n", rd, rs1, imm12 & 0x1f); // 5 BITS for SHAMT in RISCV64error: patch failed: src/coreclr/jit/emitriscv64.cpp:3617error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...Hunk #1 succeeded at 3563 (offset 3 lines).error: while searching for: return; case 0x5: // SRLIW & SRAIW { static constexpr unsigned kLogicalShiftFunct7 = 0x00; static constexpr unsigned kArithmeticShiftFunct7 = 0x20; unsigned funct7 = (imm12 >> 5) & 0x7f; if (funct7 == kLogicalShiftFunct7)error: patch failed: src/coreclr/jit/emitriscv64.cpp:3630error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...Hunk #1 succeeded at 3541 (offset 3 lines).error: while searching for: return; case 0x1: // SLLIW { unsigned funct7 = (imm12 >> 5) & 0x7f; // SLLIW's instruction code's upper 7 bits have to be equal to zero if (funct7 == 0) { printf("slliw %s, %s, %d\n", rd, rs1, imm12 & 0x1f); // 5 BITS for SHAMT in RISCV64 }error: patch failed: src/coreclr/jit/emitriscv64.cpp:3616error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...Hunk #1 succeeded at 3644 (offset -14 lines).Checking patch src/coreclr/jit/emitriscv64.cpp...Hunk #1 succeeded at 3733 (offset -14 lines).Checking patch src/coreclr/jit/emitriscv64.cpp...error: while searching for: break; case 0x1: // SLLI { static constexpr kSlliFunct6 = 0b000000; unsigned funct6 = (imm12 >> 6) & 0x3f; // SLLI's instruction code's upper 6 bits have to be equal to zeroerror: patch failed: src/coreclr/jit/emitriscv64.cpp:3538error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...error: while searching for: switch (opcode3) { case 0x0: // ADDW return; return; case 0x1: // SLLW printf("sllw %s, %s, %s\n", rd, rs1, rs2); return; case 0x5: // SRLW { return; default: return emitDispIllegalInstruction(code);error: patch failed: src/coreclr/jit/emitriscv64.cpp:3759error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...Hunk #1 succeeded at 3591 (offset 1 line).

@Bajtazar

Copy link
Copy Markdown
ContributorAuthor

Can you please fix the conflicts?

Conflicts have been fixed. Could you please review new changes?

@jakobbotsch
jakobbotsch merged commit d9bc680 into dotnet:mainMay 29, 2024
Ruihan-Yin pushed a commit to Ruihan-Yin/runtime that referenced this pull request May 30, 2024
* [RISC-V] Reworked emitDispInsName a bit to ease further development
* [RISC-V] Little improvements
* [RISC-V] Refactored code
* [RISC-V] Added mv and nop pseudoinstructions to disasm
* [RISC-V] Added branch pseudos to disasm
* [RISC-V] Removed dead code
* [RISC-V] Fixes
* [RISC-V] Added j pseudoinstruction to disasm
* [RISC-V] Improved readability
* [RISC-V] Fixed mov pseudoinstruction
* Revert "[RISC-V] Fixed mov pseudoinstruction"
This reverts commit a011c43.
* [RISC-V] Fixed mov printing name
* [RISC-V] After review changes
* [RISC-V] More fixes after review
* [RISC-V] Adjusted 32-bit shift disasm to changes
* [RISC-V] Fixed bug
* [RISC-V] Fixed comment
* [RISC-V] Changed constants' literal type
* [RISC-V] Added more constants
* [RISC-V] Reinforced printing 1
* [RISC-V] Reinforced printing 2
* [RISC-V] Fixed bug
* [RISC-V] Resolved more bugs
* [RISC-V] Removed dead assert
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Jun 29, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-riscvRelated to the RISC-V architecturearea-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIcommunity-contributionIndicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@Bajtazar@clamp03@risc-vv@tomeksowi@jakobbotsch@sirntar
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

[RISC-V] Add pseudoinstructions to disassembler - #102260

Merged
jakobbotsch merged 25 commits into
dotnet:mainfrom
Bajtazar:riscv-add-pseudo-to-disasm
May 29, 2024
Merged

[RISC-V] Add pseudoinstructions to disassembler#102260
jakobbotsch merged 25 commits into
dotnet:mainfrom
Bajtazar:riscv-add-pseudo-to-disasm

Conversation

@Bajtazar

Copy link
Copy Markdown
Contributor

Adds pseudoinstruction printing to the disassembler. Requested in #102074 (comment)

Part of #84834, cc @dotnet/samsung

@ghostghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label May 15, 2024
@dotnet-policy-servicedotnet-policy-serviceBot added the community-contribution Indicates that the PR has been added by a community member label May 15, 2024
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

@clamp03clamp03 added the arch-riscv Related to the RISC-V architecture label May 15, 2024
Comment threadsrc/coreclr/jit/emitriscv64.cpp
Comment threadsrc/coreclr/jit/emitriscv64.cpp Outdated
Comment threadsrc/coreclr/jit/emitriscv64.cpp Outdated
Comment threadsrc/coreclr/jit/emitriscv64.cpp Outdated
@Bajtazar
Bajtazar requested review from clamp03 and tomeksowiMay 16, 2024 10:47

@clamp03clamp03 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Did you check coreclr test? Could you show some dump examples?

@Bajtazar

Copy link
Copy Markdown
ContributorAuthor

LGTM Did you check coreclr test? Could you show some dump examples?

Tests passes fine

Examples of disassm:

  • mv instruction

Prior

 slli a2, a2,7 addi a2, a2,0 ld a2,0(a2)

New

 slli a2, a2,7 mv a2, a2 ld a2,0(a2)
  • bnezand j instructions

Prior

G_M10072_IG07: ;; offset=0x0064 sltiu a0, s1,65 slli a0, a0,56 srli a0, a0,56 addiw t6, a0,0 bne t6, zero, G_M10072_IG11 jal zero,80

New

G_M10072_IG07: ;; offset=0x0064 sltiu a0, s1,65 slli a0, a0,56 srli a0, a0,56 addiw t6, a0,0 bnez t6, G_M10072_IG11 j 80
  • nop instruction

Prior

G_M55990_IG31: ;; offset=0x1578 addi zero, zero,0

New

G_M55990_IG31: ;; offset=0x1578nop

@clamp03
clamp03 requested review from jakobbotsch and jkotasMay 21, 2024 00:29
@clamp03

Copy link
Copy Markdown
Member

@tomeksowi@jakobbotsch@jkotas Could you review this PR?

Comment threadsrc/coreclr/jit/emitriscv64.cpp Outdated
@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio0-checked: 2718 / 2738 (99.27%)

details

GIT: 6869460


=======================
passed: 2718
failed: 3
skipped: 16
killed: 1
------------------------
TOTAL libs: 2738
TOTAL tests: 2738
REAL time: 36min 26s 575ms
=======================
failed tests
[44.460s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[28.930s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[290.630s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
killed tests
[1810.536s] profiler.eventpipe.reverse_startup.reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio0-checked: 2720 / 2738 (99.34%)

details

GIT: 6869460


=======================
passed: 2720
failed: 2
skipped: 16
killed: 0
------------------------
TOTAL libs: 2738
TOTAL tests: 2738
REAL time: 1h 4min 5s 272ms
=======================
failed tests
[408.370s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[726.860s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio1-checked: 9396 / 9443 (99.50%)

details

GIT: 6869460


=======================
passed: 9396
failed: 4
skipped: 42
killed: 1
------------------------
TOTAL libs: 9443
TOTAL tests: 9443
REAL time: 1h 17min 16s 683ms
=======================
failed tests
[48.630s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[38.310s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[349.840s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[706.940s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
[1800.886s] profiler.eventpipe.reverse_startup.reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio1-checked: 9399 / 9443 (99.53%)

details

GIT: 6869460


=======================
passed: 9399
failed: 2
skipped: 42
killed: 0
------------------------
TOTAL libs: 9443
TOTAL tests: 9443
REAL time: 2h 50min 28s 269ms
=======================
failed tests
[416.290s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[704.320s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@jakobbotschjakobbotsch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please fix the conflicts?

@risc-vv

Copy link
Copy Markdown

RISC-V testing failed on init-build

details

GIT: a4381bd

Cloning into 'runtime'...
Updating files: 16% (9631/58593)
Updating files: 17% (9961/58593)
Updating files: 18% (10547/58593)
Updating files: 19% (11133/58593)
Updating files: 20% (11719/58593)
Updating files: 21% (12305/58593)
Updating files: 22% (12891/58593)
Updating files: 23% (13477/58593)
Updating files: 24% (14063/58593)
Updating files: 25% (14649/58593)
Updating files: 26% (15235/58593)
Updating files: 27% (15821/58593)
Updating files: 28% (16407/58593)
Updating files: 29% (16992/58593)
Updating files: 30% (17578/58593)
Updating files: 31% (18164/58593)
Updating files: 32% (18750/58593)
Updating files: 33% (19336/58593)
Updating files: 34% (19922/58593)
Updating files: 35% (20508/58593)
Updating files: 35% (20968/58593)
Updating files: 36% (21094/58593)
Updating files: 37% (21680/58593)
Updating files: 38% (22266/58593)
Updating files: 39% (22852/58593)
Updating files: 40% (23438/58593)
Updating files: 41% (24024/58593)
Updating files: 42% (24610/58593)
Updating files: 43% (25195/58593)
Updating files: 44% (25781/58593)
Updating files: 45% (26367/58593)
Updating files: 46% (26953/58593)
Updating files: 47% (27539/58593)
Updating files: 48% (28125/58593)
Updating files: 49% (28711/58593)
Updating files: 50% (29297/58593)
Updating files: 51% (29883/58593)
Updating files: 52% (30469/58593)
Updating files: 53% (31055/58593)
Updating files: 54% (31641/58593)
Updating files: 55% (32227/58593)
Updating files: 56% (32813/58593)
Updating files: 57% (33399/58593)
Updating files: 58% (33984/58593)
Updating files: 58% (34531/58593)
Updating files: 59% (34570/58593)
Updating files: 60% (35156/58593)
Updating files: 61% (35742/58593)
Updating files: 62% (36328/58593)
Updating files: 63% (36914/58593)
Updating files: 64% (37500/58593)
Updating files: 65% (38086/58593)
Updating files: 66% (38672/58593)
Updating files: 67% (39258/58593)
Updating files: 68% (39844/58593)
Updating files: 69% (40430/58593)
Updating files: 70% (41016/58593)
Updating files: 71% (41602/58593)
Updating files: 72% (42187/58593)
Updating files: 73% (42773/58593)
Updating files: 74% (43359/58593)
Updating files: 75% (43945/58593)
Updating files: 76% (44531/58593)
Updating files: 77% (45117/58593)
Updating files: 78% (45703/58593)
Updating files: 79% (46289/58593)
Updating files: 80% (46875/58593)
Updating files: 81% (47461/58593)
Updating files: 82% (48047/58593)
Updating files: 83% (48633/58593)
Updating files: 84% (49219/58593)
Updating files: 84% (49312/58593)
Updating files: 85% (49805/58593)
Updating files: 86% (50390/58593)
Updating files: 87% (50976/58593)
Updating files: 88% (51562/58593)
Updating files: 89% (52148/58593)
Updating files: 90% (52734/58593)
Updating files: 91% (53320/58593)
Updating files: 92% (53906/58593)
Updating files: 93% (54492/58593)
Updating files: 94% (55078/58593)
Updating files: 95% (55664/58593)
Updating files: 96% (56250/58593)
Updating files: 97% (56836/58593)
Updating files: 98% (57422/58593)
Updating files: 99% (58008/58593)
Updating files: 100% (58593/58593)
Updating files: 100% (58593/58593), done.
Switched to a new branch 'build-net'
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3506 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3506 (offset 3 lines).
Hunk #2 succeeded at 3555 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3508 (offset 3 lines).
Hunk #2 succeeded at 3532 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3508 (offset 3 lines).
Hunk #2 succeeded at 3570 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3347 (offset 3 lines).
Hunk #2 succeeded at 3413 (offset 3 lines).
Hunk #3 succeeded at 3822 (offset 10 lines).
Checking patch src/coreclr/jit/emitriscv64.h...
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3825 (offset 10 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3347 (offset 3 lines).
Hunk #2 succeeded at 3367 (offset 3 lines).
Hunk #3 succeeded at 3457 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3478 (offset 3 lines).
Hunk #2 succeeded at 3516 (offset 3 lines).
Hunk #3 succeeded at 3822 (offset 10 lines).
Hunk #4 succeeded at 3901 (offset 10 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3428 (offset 3 lines).
Hunk #2 succeeded at 3531 (offset 3 lines).
Hunk #3 succeeded at 3908 (offset 10 lines).
Checking patch src/coreclr/jit/codegenriscv64.cpp...
Checking patch src/coreclr/jit/emitriscv64.cpp...
error: while searching for:
{
code_t code = emitInsCode(ins);if (INS_mov == ins)
{
assert(isGeneralRegisterOrR0(reg1));
assert(isGeneralRegisterOrR0(reg2));
error: patch failed: src/coreclr/jit/emitriscv64.cpp:588
error: src/coreclr/jit/emitriscv64.cpp: patch does not apply
Checking patch src/coreclr/jit/instrsriscv64.h...
error: while searching for:
INST(nop, "nop", 0, 0x00000013)
//// R_R
INST(mov, "mov", 0, 0x00000013)
////R_I
INST(lui, "lui", 0, 0x00000037)
error: patch failed: src/coreclr/jit/instrsriscv64.h:35
error: src/coreclr/jit/instrsriscv64.h: patch does not apply
Checking patch src/coreclr/jit/codegenriscv64.cpp...
Checking patch src/coreclr/jit/emitriscv64.cpp...
error: while searching for:
inline bool emitter::emitInsMayWriteToGCReg(instruction ins)
{
assert(ins != INS_invalid);return (ins <= INS_remuw) && (ins >= INS_mv) &&!(ins >= INS_jal && ins <= INS_bgeu && ins != INS_jalr) &&
(CodeGenInterface::instInfo[ins] & ST) == 0
?true:false;
error: patch failed: src/coreclr/jit/emitriscv64.cpp:141
error: src/coreclr/jit/emitriscv64.cpp: patch does not apply
Checking patch src/coreclr/jit/instrsriscv64.h...
error: while searching for:
INST(nop, "nop", 0, 0x00000013)
//// R_R
INST(mv, "mv", 0, 0x00000013)
////R_I
INST(lui, "lui", 0, 0x00000037)
error: patch failed: src/coreclr/jit/instrsriscv64.h:35
error: src/coreclr/jit/instrsriscv64.h: patch does not apply
Checking patch src/coreclr/jit/instrsriscv64.h...
error: while searching for:
INST(nop, "nop", 0, 0x00000013)
//// R_R
INST(mov, "mov", 0, 0x00000013)
////R_I
INST(lui, "lui", 0, 0x00000037)
error: patch failed: src/coreclr/jit/instrsriscv64.h:35
error: src/coreclr/jit/instrsriscv64.h: patch does not apply
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3360 (offset 3 lines).
Hunk #2 succeeded at 3373 (offset 3 lines).
Hunk #3 succeeded at 3524 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3540 (offset 3 lines).
Hunk #2 succeeded at 3562 (offset 3 lines).
Hunk #3 succeeded at 3587 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
error: while searching for:
case 0x0: // ADDIW
printf("addiw %s, %s, %d\n", rd, rs1, imm12);return;case 0x1: // SLLIW
printf("slliw %s, %s, %d\n", rd, rs1, imm12 & 0x3f); // 6 BITS forSHAMTin RISCV64
return;case 0x5: // SRLIW & SRAIW
if(((code >>30) &0x1) ==0) { printf("srliw %s, %s, %d\n", rd, rs1, imm12 & 0x1f); // 5BITS for SHAMT in RISCV64 } else { printf("sraiw %s, %s, %d\n", rd, rs1, imm12 & 0x1f); // 5BITS for SHAMT in RISCV64 } return; default: printf("RISCV64 illegal instruction: 0x%08X\n", code); return; } } case 0x33:error: patch failed: src/coreclr/jit/emitriscv64.cpp:3614error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...error: while searching for: case 0x5: // SRLIW & SRAIW { static constexpr unsigned kLogicalShiftFunct7 = 0x00; static constexpr unsigned kArithmeticShiftFunct7 = 0x30; unsigned funct7 = (imm12 >> 5) & 0x7f; if (funct7 == kLogicalShiftFunct7)error: patch failed: src/coreclr/jit/emitriscv64.cpp:3631error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...error: while searching for: case 0x1: // SLLIW { unsigned funct7 = (imm12 >> 5) & 0x7f; // SLLI's instruction code's upper 7 bits have to be equal to zero if (funct7 == 0) { printf("slliw %s, %s, %d\n", rd, rs1, imm12 & 0x1f); // 5 BITS for SHAMT in RISCV64error: patch failed: src/coreclr/jit/emitriscv64.cpp:3617error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...Hunk #1 succeeded at 3563 (offset 3 lines).error: while searching for: return; case 0x5: // SRLIW & SRAIW { static constexpr unsigned kLogicalShiftFunct7 = 0x00; static constexpr unsigned kArithmeticShiftFunct7 = 0x20; unsigned funct7 = (imm12 >> 5) & 0x7f; if (funct7 == kLogicalShiftFunct7)error: patch failed: src/coreclr/jit/emitriscv64.cpp:3630error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...Hunk #1 succeeded at 3541 (offset 3 lines).error: while searching for: return; case 0x1: // SLLIW { unsigned funct7 = (imm12 >> 5) & 0x7f; // SLLIW's instruction code's upper 7 bits have to be equal to zero if (funct7 == 0) { printf("slliw %s, %s, %d\n", rd, rs1, imm12 & 0x1f); // 5 BITS for SHAMT in RISCV64 }error: patch failed: src/coreclr/jit/emitriscv64.cpp:3616error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...Hunk #1 succeeded at 3644 (offset -14 lines).Checking patch src/coreclr/jit/emitriscv64.cpp...Hunk #1 succeeded at 3733 (offset -14 lines).Checking patch src/coreclr/jit/emitriscv64.cpp...error: while searching for: break; case 0x1: // SLLI { static constexpr kSlliFunct6 = 0b000000; unsigned funct6 = (imm12 >> 6) & 0x3f; // SLLI's instruction code's upper 6 bits have to be equal to zeroerror: patch failed: src/coreclr/jit/emitriscv64.cpp:3538error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...error: while searching for: switch (opcode3) { case 0x0: // ADDW return; return; case 0x1: // SLLW printf("sllw %s, %s, %s\n", rd, rs1, rs2); return; case 0x5: // SRLW { return; default: return emitDispIllegalInstruction(code);error: patch failed: src/coreclr/jit/emitriscv64.cpp:3759error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...Hunk #1 succeeded at 3591 (offset 1 line).

@Bajtazar

Copy link
Copy Markdown
ContributorAuthor

Can you please fix the conflicts?

Conflicts have been fixed. Could you please review new changes?

@jakobbotsch
jakobbotsch merged commit d9bc680 into dotnet:mainMay 29, 2024
Ruihan-Yin pushed a commit to Ruihan-Yin/runtime that referenced this pull request May 30, 2024
* [RISC-V] Reworked emitDispInsName a bit to ease further development
* [RISC-V] Little improvements
* [RISC-V] Refactored code
* [RISC-V] Added mv and nop pseudoinstructions to disasm
* [RISC-V] Added branch pseudos to disasm
* [RISC-V] Removed dead code
* [RISC-V] Fixes
* [RISC-V] Added j pseudoinstruction to disasm
* [RISC-V] Improved readability
* [RISC-V] Fixed mov pseudoinstruction
* Revert "[RISC-V] Fixed mov pseudoinstruction"
This reverts commit a011c43.
* [RISC-V] Fixed mov printing name
* [RISC-V] After review changes
* [RISC-V] More fixes after review
* [RISC-V] Adjusted 32-bit shift disasm to changes
* [RISC-V] Fixed bug
* [RISC-V] Fixed comment
* [RISC-V] Changed constants' literal type
* [RISC-V] Added more constants
* [RISC-V] Reinforced printing 1
* [RISC-V] Reinforced printing 2
* [RISC-V] Fixed bug
* [RISC-V] Resolved more bugs
* [RISC-V] Removed dead assert
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Jun 29, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-riscvRelated to the RISC-V architecturearea-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIcommunity-contributionIndicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@Bajtazar@clamp03@risc-vv@tomeksowi@jakobbotsch@sirntar
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

[RISC-V] Add pseudoinstructions to disassembler - #102260

Merged
jakobbotsch merged 25 commits into
dotnet:mainfrom
Bajtazar:riscv-add-pseudo-to-disasm
May 29, 2024
Merged

[RISC-V] Add pseudoinstructions to disassembler#102260
jakobbotsch merged 25 commits into
dotnet:mainfrom
Bajtazar:riscv-add-pseudo-to-disasm

Conversation

@Bajtazar

Copy link
Copy Markdown
Contributor

Adds pseudoinstruction printing to the disassembler. Requested in #102074 (comment)

Part of #84834, cc @dotnet/samsung

@ghostghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label May 15, 2024
@dotnet-policy-servicedotnet-policy-serviceBot added the community-contribution Indicates that the PR has been added by a community member label May 15, 2024
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

@clamp03clamp03 added the arch-riscv Related to the RISC-V architecture label May 15, 2024
Comment threadsrc/coreclr/jit/emitriscv64.cpp
Comment threadsrc/coreclr/jit/emitriscv64.cpp Outdated
Comment threadsrc/coreclr/jit/emitriscv64.cpp Outdated
Comment threadsrc/coreclr/jit/emitriscv64.cpp Outdated
@Bajtazar
Bajtazar requested review from clamp03 and tomeksowiMay 16, 2024 10:47

@clamp03clamp03 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Did you check coreclr test? Could you show some dump examples?

@Bajtazar

Copy link
Copy Markdown
ContributorAuthor

LGTM Did you check coreclr test? Could you show some dump examples?

Tests passes fine

Examples of disassm:

  • mv instruction

Prior

 slli a2, a2,7 addi a2, a2,0 ld a2,0(a2)

New

 slli a2, a2,7 mv a2, a2 ld a2,0(a2)
  • bnezand j instructions

Prior

G_M10072_IG07: ;; offset=0x0064 sltiu a0, s1,65 slli a0, a0,56 srli a0, a0,56 addiw t6, a0,0 bne t6, zero, G_M10072_IG11 jal zero,80

New

G_M10072_IG07: ;; offset=0x0064 sltiu a0, s1,65 slli a0, a0,56 srli a0, a0,56 addiw t6, a0,0 bnez t6, G_M10072_IG11 j 80
  • nop instruction

Prior

G_M55990_IG31: ;; offset=0x1578 addi zero, zero,0

New

G_M55990_IG31: ;; offset=0x1578nop

@clamp03
clamp03 requested review from jakobbotsch and jkotasMay 21, 2024 00:29
@clamp03

Copy link
Copy Markdown
Member

@tomeksowi@jakobbotsch@jkotas Could you review this PR?

Comment threadsrc/coreclr/jit/emitriscv64.cpp Outdated
@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio0-checked: 2718 / 2738 (99.27%)

details

GIT: 6869460


=======================
passed: 2718
failed: 3
skipped: 16
killed: 1
------------------------
TOTAL libs: 2738
TOTAL tests: 2738
REAL time: 36min 26s 575ms
=======================
failed tests
[44.460s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[28.930s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[290.630s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
killed tests
[1810.536s] profiler.eventpipe.reverse_startup.reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio0-checked: 2720 / 2738 (99.34%)

details

GIT: 6869460


=======================
passed: 2720
failed: 2
skipped: 16
killed: 0
------------------------
TOTAL libs: 2738
TOTAL tests: 2738
REAL time: 1h 4min 5s 272ms
=======================
failed tests
[408.370s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[726.860s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio1-checked: 9396 / 9443 (99.50%)

details

GIT: 6869460


=======================
passed: 9396
failed: 4
skipped: 42
killed: 1
------------------------
TOTAL libs: 9443
TOTAL tests: 9443
REAL time: 1h 17min 16s 683ms
=======================
failed tests
[48.630s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[38.310s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[349.840s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[706.940s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
[1800.886s] profiler.eventpipe.reverse_startup.reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio1-checked: 9399 / 9443 (99.53%)

details

GIT: 6869460


=======================
passed: 9399
failed: 2
skipped: 42
killed: 0
------------------------
TOTAL libs: 9443
TOTAL tests: 9443
REAL time: 2h 50min 28s 269ms
=======================
failed tests
[416.290s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[704.320s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@jakobbotschjakobbotsch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please fix the conflicts?

@risc-vv

Copy link
Copy Markdown

RISC-V testing failed on init-build

details

GIT: a4381bd

Cloning into 'runtime'...
Updating files: 16% (9631/58593)
Updating files: 17% (9961/58593)
Updating files: 18% (10547/58593)
Updating files: 19% (11133/58593)
Updating files: 20% (11719/58593)
Updating files: 21% (12305/58593)
Updating files: 22% (12891/58593)
Updating files: 23% (13477/58593)
Updating files: 24% (14063/58593)
Updating files: 25% (14649/58593)
Updating files: 26% (15235/58593)
Updating files: 27% (15821/58593)
Updating files: 28% (16407/58593)
Updating files: 29% (16992/58593)
Updating files: 30% (17578/58593)
Updating files: 31% (18164/58593)
Updating files: 32% (18750/58593)
Updating files: 33% (19336/58593)
Updating files: 34% (19922/58593)
Updating files: 35% (20508/58593)
Updating files: 35% (20968/58593)
Updating files: 36% (21094/58593)
Updating files: 37% (21680/58593)
Updating files: 38% (22266/58593)
Updating files: 39% (22852/58593)
Updating files: 40% (23438/58593)
Updating files: 41% (24024/58593)
Updating files: 42% (24610/58593)
Updating files: 43% (25195/58593)
Updating files: 44% (25781/58593)
Updating files: 45% (26367/58593)
Updating files: 46% (26953/58593)
Updating files: 47% (27539/58593)
Updating files: 48% (28125/58593)
Updating files: 49% (28711/58593)
Updating files: 50% (29297/58593)
Updating files: 51% (29883/58593)
Updating files: 52% (30469/58593)
Updating files: 53% (31055/58593)
Updating files: 54% (31641/58593)
Updating files: 55% (32227/58593)
Updating files: 56% (32813/58593)
Updating files: 57% (33399/58593)
Updating files: 58% (33984/58593)
Updating files: 58% (34531/58593)
Updating files: 59% (34570/58593)
Updating files: 60% (35156/58593)
Updating files: 61% (35742/58593)
Updating files: 62% (36328/58593)
Updating files: 63% (36914/58593)
Updating files: 64% (37500/58593)
Updating files: 65% (38086/58593)
Updating files: 66% (38672/58593)
Updating files: 67% (39258/58593)
Updating files: 68% (39844/58593)
Updating files: 69% (40430/58593)
Updating files: 70% (41016/58593)
Updating files: 71% (41602/58593)
Updating files: 72% (42187/58593)
Updating files: 73% (42773/58593)
Updating files: 74% (43359/58593)
Updating files: 75% (43945/58593)
Updating files: 76% (44531/58593)
Updating files: 77% (45117/58593)
Updating files: 78% (45703/58593)
Updating files: 79% (46289/58593)
Updating files: 80% (46875/58593)
Updating files: 81% (47461/58593)
Updating files: 82% (48047/58593)
Updating files: 83% (48633/58593)
Updating files: 84% (49219/58593)
Updating files: 84% (49312/58593)
Updating files: 85% (49805/58593)
Updating files: 86% (50390/58593)
Updating files: 87% (50976/58593)
Updating files: 88% (51562/58593)
Updating files: 89% (52148/58593)
Updating files: 90% (52734/58593)
Updating files: 91% (53320/58593)
Updating files: 92% (53906/58593)
Updating files: 93% (54492/58593)
Updating files: 94% (55078/58593)
Updating files: 95% (55664/58593)
Updating files: 96% (56250/58593)
Updating files: 97% (56836/58593)
Updating files: 98% (57422/58593)
Updating files: 99% (58008/58593)
Updating files: 100% (58593/58593)
Updating files: 100% (58593/58593), done.
Switched to a new branch 'build-net'
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3506 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3506 (offset 3 lines).
Hunk #2 succeeded at 3555 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3508 (offset 3 lines).
Hunk #2 succeeded at 3532 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3508 (offset 3 lines).
Hunk #2 succeeded at 3570 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3347 (offset 3 lines).
Hunk #2 succeeded at 3413 (offset 3 lines).
Hunk #3 succeeded at 3822 (offset 10 lines).
Checking patch src/coreclr/jit/emitriscv64.h...
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3825 (offset 10 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3347 (offset 3 lines).
Hunk #2 succeeded at 3367 (offset 3 lines).
Hunk #3 succeeded at 3457 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3478 (offset 3 lines).
Hunk #2 succeeded at 3516 (offset 3 lines).
Hunk #3 succeeded at 3822 (offset 10 lines).
Hunk #4 succeeded at 3901 (offset 10 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3428 (offset 3 lines).
Hunk #2 succeeded at 3531 (offset 3 lines).
Hunk #3 succeeded at 3908 (offset 10 lines).
Checking patch src/coreclr/jit/codegenriscv64.cpp...
Checking patch src/coreclr/jit/emitriscv64.cpp...
error: while searching for:
{
code_t code = emitInsCode(ins);if (INS_mov == ins)
{
assert(isGeneralRegisterOrR0(reg1));
assert(isGeneralRegisterOrR0(reg2));
error: patch failed: src/coreclr/jit/emitriscv64.cpp:588
error: src/coreclr/jit/emitriscv64.cpp: patch does not apply
Checking patch src/coreclr/jit/instrsriscv64.h...
error: while searching for:
INST(nop, "nop", 0, 0x00000013)
//// R_R
INST(mov, "mov", 0, 0x00000013)
////R_I
INST(lui, "lui", 0, 0x00000037)
error: patch failed: src/coreclr/jit/instrsriscv64.h:35
error: src/coreclr/jit/instrsriscv64.h: patch does not apply
Checking patch src/coreclr/jit/codegenriscv64.cpp...
Checking patch src/coreclr/jit/emitriscv64.cpp...
error: while searching for:
inline bool emitter::emitInsMayWriteToGCReg(instruction ins)
{
assert(ins != INS_invalid);return (ins <= INS_remuw) && (ins >= INS_mv) &&!(ins >= INS_jal && ins <= INS_bgeu && ins != INS_jalr) &&
(CodeGenInterface::instInfo[ins] & ST) == 0
?true:false;
error: patch failed: src/coreclr/jit/emitriscv64.cpp:141
error: src/coreclr/jit/emitriscv64.cpp: patch does not apply
Checking patch src/coreclr/jit/instrsriscv64.h...
error: while searching for:
INST(nop, "nop", 0, 0x00000013)
//// R_R
INST(mv, "mv", 0, 0x00000013)
////R_I
INST(lui, "lui", 0, 0x00000037)
error: patch failed: src/coreclr/jit/instrsriscv64.h:35
error: src/coreclr/jit/instrsriscv64.h: patch does not apply
Checking patch src/coreclr/jit/instrsriscv64.h...
error: while searching for:
INST(nop, "nop", 0, 0x00000013)
//// R_R
INST(mov, "mov", 0, 0x00000013)
////R_I
INST(lui, "lui", 0, 0x00000037)
error: patch failed: src/coreclr/jit/instrsriscv64.h:35
error: src/coreclr/jit/instrsriscv64.h: patch does not apply
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3360 (offset 3 lines).
Hunk #2 succeeded at 3373 (offset 3 lines).
Hunk #3 succeeded at 3524 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3540 (offset 3 lines).
Hunk #2 succeeded at 3562 (offset 3 lines).
Hunk #3 succeeded at 3587 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
error: while searching for:
case 0x0: // ADDIW
printf("addiw %s, %s, %d\n", rd, rs1, imm12);return;case 0x1: // SLLIW
printf("slliw %s, %s, %d\n", rd, rs1, imm12 & 0x3f); // 6 BITS forSHAMTin RISCV64
return;case 0x5: // SRLIW & SRAIW
if(((code >>30) &0x1) ==0) { printf("srliw %s, %s, %d\n", rd, rs1, imm12 & 0x1f); // 5BITS for SHAMT in RISCV64 } else { printf("sraiw %s, %s, %d\n", rd, rs1, imm12 & 0x1f); // 5BITS for SHAMT in RISCV64 } return; default: printf("RISCV64 illegal instruction: 0x%08X\n", code); return; } } case 0x33:error: patch failed: src/coreclr/jit/emitriscv64.cpp:3614error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...error: while searching for: case 0x5: // SRLIW & SRAIW { static constexpr unsigned kLogicalShiftFunct7 = 0x00; static constexpr unsigned kArithmeticShiftFunct7 = 0x30; unsigned funct7 = (imm12 >> 5) & 0x7f; if (funct7 == kLogicalShiftFunct7)error: patch failed: src/coreclr/jit/emitriscv64.cpp:3631error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...error: while searching for: case 0x1: // SLLIW { unsigned funct7 = (imm12 >> 5) & 0x7f; // SLLI's instruction code's upper 7 bits have to be equal to zero if (funct7 == 0) { printf("slliw %s, %s, %d\n", rd, rs1, imm12 & 0x1f); // 5 BITS for SHAMT in RISCV64error: patch failed: src/coreclr/jit/emitriscv64.cpp:3617error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...Hunk #1 succeeded at 3563 (offset 3 lines).error: while searching for: return; case 0x5: // SRLIW & SRAIW { static constexpr unsigned kLogicalShiftFunct7 = 0x00; static constexpr unsigned kArithmeticShiftFunct7 = 0x20; unsigned funct7 = (imm12 >> 5) & 0x7f; if (funct7 == kLogicalShiftFunct7)error: patch failed: src/coreclr/jit/emitriscv64.cpp:3630error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...Hunk #1 succeeded at 3541 (offset 3 lines).error: while searching for: return; case 0x1: // SLLIW { unsigned funct7 = (imm12 >> 5) & 0x7f; // SLLIW's instruction code's upper 7 bits have to be equal to zero if (funct7 == 0) { printf("slliw %s, %s, %d\n", rd, rs1, imm12 & 0x1f); // 5 BITS for SHAMT in RISCV64 }error: patch failed: src/coreclr/jit/emitriscv64.cpp:3616error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...Hunk #1 succeeded at 3644 (offset -14 lines).Checking patch src/coreclr/jit/emitriscv64.cpp...Hunk #1 succeeded at 3733 (offset -14 lines).Checking patch src/coreclr/jit/emitriscv64.cpp...error: while searching for: break; case 0x1: // SLLI { static constexpr kSlliFunct6 = 0b000000; unsigned funct6 = (imm12 >> 6) & 0x3f; // SLLI's instruction code's upper 6 bits have to be equal to zeroerror: patch failed: src/coreclr/jit/emitriscv64.cpp:3538error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...error: while searching for: switch (opcode3) { case 0x0: // ADDW return; return; case 0x1: // SLLW printf("sllw %s, %s, %s\n", rd, rs1, rs2); return; case 0x5: // SRLW { return; default: return emitDispIllegalInstruction(code);error: patch failed: src/coreclr/jit/emitriscv64.cpp:3759error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...Hunk #1 succeeded at 3591 (offset 1 line).

@Bajtazar

Copy link
Copy Markdown
ContributorAuthor

Can you please fix the conflicts?

Conflicts have been fixed. Could you please review new changes?

@jakobbotsch
jakobbotsch merged commit d9bc680 into dotnet:mainMay 29, 2024
Ruihan-Yin pushed a commit to Ruihan-Yin/runtime that referenced this pull request May 30, 2024
* [RISC-V] Reworked emitDispInsName a bit to ease further development
* [RISC-V] Little improvements
* [RISC-V] Refactored code
* [RISC-V] Added mv and nop pseudoinstructions to disasm
* [RISC-V] Added branch pseudos to disasm
* [RISC-V] Removed dead code
* [RISC-V] Fixes
* [RISC-V] Added j pseudoinstruction to disasm
* [RISC-V] Improved readability
* [RISC-V] Fixed mov pseudoinstruction
* Revert "[RISC-V] Fixed mov pseudoinstruction"
This reverts commit a011c43.
* [RISC-V] Fixed mov printing name
* [RISC-V] After review changes
* [RISC-V] More fixes after review
* [RISC-V] Adjusted 32-bit shift disasm to changes
* [RISC-V] Fixed bug
* [RISC-V] Fixed comment
* [RISC-V] Changed constants' literal type
* [RISC-V] Added more constants
* [RISC-V] Reinforced printing 1
* [RISC-V] Reinforced printing 2
* [RISC-V] Fixed bug
* [RISC-V] Resolved more bugs
* [RISC-V] Removed dead assert
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Jun 29, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-riscvRelated to the RISC-V architecturearea-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIcommunity-contributionIndicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@Bajtazar@clamp03@risc-vv@tomeksowi@jakobbotsch@sirntar
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

[RISC-V] Add pseudoinstructions to disassembler - #102260

Merged
jakobbotsch merged 25 commits into
dotnet:mainfrom
Bajtazar:riscv-add-pseudo-to-disasm
May 29, 2024
Merged

[RISC-V] Add pseudoinstructions to disassembler#102260
jakobbotsch merged 25 commits into
dotnet:mainfrom
Bajtazar:riscv-add-pseudo-to-disasm

Conversation

@Bajtazar

Copy link
Copy Markdown
Contributor

Adds pseudoinstruction printing to the disassembler. Requested in #102074 (comment)

Part of #84834, cc @dotnet/samsung

@ghostghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label May 15, 2024
@dotnet-policy-servicedotnet-policy-serviceBot added the community-contribution Indicates that the PR has been added by a community member label May 15, 2024
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

@clamp03clamp03 added the arch-riscv Related to the RISC-V architecture label May 15, 2024
Comment threadsrc/coreclr/jit/emitriscv64.cpp
Comment threadsrc/coreclr/jit/emitriscv64.cpp Outdated
Comment threadsrc/coreclr/jit/emitriscv64.cpp Outdated
Comment threadsrc/coreclr/jit/emitriscv64.cpp Outdated
@Bajtazar
Bajtazar requested review from clamp03 and tomeksowiMay 16, 2024 10:47

@clamp03clamp03 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Did you check coreclr test? Could you show some dump examples?

@Bajtazar

Copy link
Copy Markdown
ContributorAuthor

LGTM Did you check coreclr test? Could you show some dump examples?

Tests passes fine

Examples of disassm:

  • mv instruction

Prior

 slli a2, a2,7 addi a2, a2,0 ld a2,0(a2)

New

 slli a2, a2,7 mv a2, a2 ld a2,0(a2)
  • bnezand j instructions

Prior

G_M10072_IG07: ;; offset=0x0064 sltiu a0, s1,65 slli a0, a0,56 srli a0, a0,56 addiw t6, a0,0 bne t6, zero, G_M10072_IG11 jal zero,80

New

G_M10072_IG07: ;; offset=0x0064 sltiu a0, s1,65 slli a0, a0,56 srli a0, a0,56 addiw t6, a0,0 bnez t6, G_M10072_IG11 j 80
  • nop instruction

Prior

G_M55990_IG31: ;; offset=0x1578 addi zero, zero,0

New

G_M55990_IG31: ;; offset=0x1578nop

@clamp03
clamp03 requested review from jakobbotsch and jkotasMay 21, 2024 00:29
@clamp03

Copy link
Copy Markdown
Member

@tomeksowi@jakobbotsch@jkotas Could you review this PR?

Comment threadsrc/coreclr/jit/emitriscv64.cpp Outdated
@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio0-checked: 2718 / 2738 (99.27%)

details

GIT: 6869460


=======================
passed: 2718
failed: 3
skipped: 16
killed: 1
------------------------
TOTAL libs: 2738
TOTAL tests: 2738
REAL time: 36min 26s 575ms
=======================
failed tests
[44.460s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[28.930s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[290.630s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
killed tests
[1810.536s] profiler.eventpipe.reverse_startup.reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio0-checked: 2720 / 2738 (99.34%)

details

GIT: 6869460


=======================
passed: 2720
failed: 2
skipped: 16
killed: 0
------------------------
TOTAL libs: 2738
TOTAL tests: 2738
REAL time: 1h 4min 5s 272ms
=======================
failed tests
[408.370s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[726.860s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for qemu-prio1-checked: 9396 / 9443 (99.50%)

details

GIT: 6869460


=======================
passed: 9396
failed: 4
skipped: 42
killed: 1
------------------------
TOTAL libs: 9443
TOTAL tests: 9443
REAL time: 1h 17min 16s 683ms
=======================
failed tests
[48.630s] profiler.unittest.releaseondetach.releaseondetach.sh
[exitcode-134]: SIGABRT Abort. Managed or native assert, or runtime check such as heap corruption, caused call to abort(). Core dumped.
[38.310s] JIT.Directed.debugging.debuginfo.tester.tester.sh
[exitcode- -1]: unknown error
[349.840s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[706.940s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
[1800.886s] profiler.eventpipe.reverse_startup.reverse_startup.sh
skipped tests
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh

@risc-vv

Copy link
Copy Markdown

RISC-V test results for starfive-prio1-checked: 9399 / 9443 (99.53%)

details

GIT: 6869460


=======================
passed: 9399
failed: 2
skipped: 42
killed: 0
------------------------
TOTAL libs: 9443
TOTAL tests: 9443
REAL time: 2h 50min 28s 269ms
=======================
failed tests
[416.290s] readytorun.determinism.crossgen2determinism.crossgen2determinism.sh
[exitcode-101]: Unknown exit code.
[704.320s] readytorun.coreroot_determinism.coreroot_determinism.coreroot_determinism.sh
[exitcode- 1]: unknown error
killed tests
skipped tests
[0.000s] readytorun.DynamicMethodGCStress.DynamicMethodGCStress.DynamicMethodGCStress.sh
[0.000s] readytorun.GenericCycleDetection.Depth3Test.Depth3Test.sh
[0.000s] GC.Features.LOHFragmentation.lohfragmentation.lohfragmentation.sh
[0.000s] GC.Features.BackgroundGC.foregroundgc.foregroundgc.sh
[0.000s] GC.Coverage.271010.271010.sh
[0.000s] GC.LargeMemory.Allocation.finalizertest.finalizertest.sh
[0.000s] GC.LargeMemory.API.gc.collect.collect.sh
[0.000s] GC.LargeMemory.API.gc.reregisterforfinalize.reregisterforfinalize.sh
[0.000s] GC.LargeMemory.API.gc.getgeneration.getgeneration.sh
[0.000s] GC.Regressions.dev10bugs.536168.536168.536168.sh
[0.000s] GC.Regressions.Github.Runtime_76219.Runtime_76219.Runtime_76219.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M11-Beta1.b41391.b41391.b41391.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b37646.b37646.b37646.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b31746.b31746.b31746.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M12-Beta2.b41852.b41852.b41852.sh
[0.000s] JIT.Regression.CLR-x86-JIT.V1-M09.5-PDC.b16423.b16423.b16423.sh
[0.000s] JIT.Regression.JitBlue.Runtime_57606.Runtime_57606.Runtime_57606.sh
[0.000s] JIT.Regression.CLR-x86-EJIT.V1-M12-Beta2.b26323.b26323.b26323.sh
[0.000s] JIT.Directed.arglist.vararg_TargetUnix.vararg_TargetUnix.sh
[0.000s] JIT.Directed.rvastatics.RVAOrderingTest.RVAOrderingTest.sh
[0.000s] JIT.Directed.PREFIX.volatile.1.arglist_Target_64BIT_volatile.arglist_Target_64BIT_volatile.sh
[0.000s] JIT.Directed.PREFIX.unaligned.4.arglist_Target_64BIT_unaligned_4.arglist_Target_64BIT_unaligned_4.sh
[0.000s] JIT.Directed.PREFIX.unaligned.2.arglist_Target_64BIT_unaligned_2.arglist_Target_64BIT_unaligned_2.sh
[0.000s] JIT.Directed.PREFIX.unaligned.1.arglist_Target_64BIT_unaligned_1.arglist_Target_64BIT_unaligned_1.sh
[0.000s] JIT.jit64.mcc.interop.mcc_i00.mcc_i00.sh
[0.000s] JIT.opt.SSA.MemorySsa.MemorySsa.sh
[0.000s] JIT.opt.ValueNumbering.ExposedLocalsNumbering.ExposedLocalsNumbering.sh
[0.000s] JIT.Methodical.Coverage.arglist_pos.arglist_pos.sh
[0.000s] JIT.Methodical.refany.seq_d.seq_d.sh
[0.000s] JIT.Methodical.refany.seq_r.seq_r.sh
[0.000s] Loader.binding.tracing.BinderTracingTest.Basic.BinderTracingTest.Basic.sh
[0.000s] Interop.MonoAPI.MonoMono.Thunks.Thunks.sh
[0.000s] Interop.MonoAPI.MonoMono.PInvokeDetach.PInvokeDetach.sh
[0.000s] Interop.MonoAPI.MonoMono.InstallEHCallback.InstallEHCallback.sh
[0.000s] tracing.eventpipe.eventsourceerror.eventsourceerror.eventsourceerror.sh
[0.000s] baseservices.finalization.CriticalFinalizer.CriticalFinalizer.sh
[0.000s] baseservices.mono.runningmono.runningmono.sh
[0.000s] baseservices.threading.regressions.2164.foreground-shutdown.foreground-shutdown.sh
[0.000s] baseservices.exceptions.stackoverflow.stackoverflowtester.stackoverflowtester.sh
[0.000s] baseservices.exceptions.StackTracePreserve.StackTracePreserveTests.StackTracePreserveTests.sh
[0.000s] baseservices.typeequivalence.istypeequivalent.istypeequivalent.istypeequivalent.sh
[0.000s] baseservices.typeequivalence.signatures.nopiatestil.nopiatestil.sh

@jakobbotschjakobbotsch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please fix the conflicts?

@risc-vv

Copy link
Copy Markdown

RISC-V testing failed on init-build

details

GIT: a4381bd

Cloning into 'runtime'...
Updating files: 16% (9631/58593)
Updating files: 17% (9961/58593)
Updating files: 18% (10547/58593)
Updating files: 19% (11133/58593)
Updating files: 20% (11719/58593)
Updating files: 21% (12305/58593)
Updating files: 22% (12891/58593)
Updating files: 23% (13477/58593)
Updating files: 24% (14063/58593)
Updating files: 25% (14649/58593)
Updating files: 26% (15235/58593)
Updating files: 27% (15821/58593)
Updating files: 28% (16407/58593)
Updating files: 29% (16992/58593)
Updating files: 30% (17578/58593)
Updating files: 31% (18164/58593)
Updating files: 32% (18750/58593)
Updating files: 33% (19336/58593)
Updating files: 34% (19922/58593)
Updating files: 35% (20508/58593)
Updating files: 35% (20968/58593)
Updating files: 36% (21094/58593)
Updating files: 37% (21680/58593)
Updating files: 38% (22266/58593)
Updating files: 39% (22852/58593)
Updating files: 40% (23438/58593)
Updating files: 41% (24024/58593)
Updating files: 42% (24610/58593)
Updating files: 43% (25195/58593)
Updating files: 44% (25781/58593)
Updating files: 45% (26367/58593)
Updating files: 46% (26953/58593)
Updating files: 47% (27539/58593)
Updating files: 48% (28125/58593)
Updating files: 49% (28711/58593)
Updating files: 50% (29297/58593)
Updating files: 51% (29883/58593)
Updating files: 52% (30469/58593)
Updating files: 53% (31055/58593)
Updating files: 54% (31641/58593)
Updating files: 55% (32227/58593)
Updating files: 56% (32813/58593)
Updating files: 57% (33399/58593)
Updating files: 58% (33984/58593)
Updating files: 58% (34531/58593)
Updating files: 59% (34570/58593)
Updating files: 60% (35156/58593)
Updating files: 61% (35742/58593)
Updating files: 62% (36328/58593)
Updating files: 63% (36914/58593)
Updating files: 64% (37500/58593)
Updating files: 65% (38086/58593)
Updating files: 66% (38672/58593)
Updating files: 67% (39258/58593)
Updating files: 68% (39844/58593)
Updating files: 69% (40430/58593)
Updating files: 70% (41016/58593)
Updating files: 71% (41602/58593)
Updating files: 72% (42187/58593)
Updating files: 73% (42773/58593)
Updating files: 74% (43359/58593)
Updating files: 75% (43945/58593)
Updating files: 76% (44531/58593)
Updating files: 77% (45117/58593)
Updating files: 78% (45703/58593)
Updating files: 79% (46289/58593)
Updating files: 80% (46875/58593)
Updating files: 81% (47461/58593)
Updating files: 82% (48047/58593)
Updating files: 83% (48633/58593)
Updating files: 84% (49219/58593)
Updating files: 84% (49312/58593)
Updating files: 85% (49805/58593)
Updating files: 86% (50390/58593)
Updating files: 87% (50976/58593)
Updating files: 88% (51562/58593)
Updating files: 89% (52148/58593)
Updating files: 90% (52734/58593)
Updating files: 91% (53320/58593)
Updating files: 92% (53906/58593)
Updating files: 93% (54492/58593)
Updating files: 94% (55078/58593)
Updating files: 95% (55664/58593)
Updating files: 96% (56250/58593)
Updating files: 97% (56836/58593)
Updating files: 98% (57422/58593)
Updating files: 99% (58008/58593)
Updating files: 100% (58593/58593)
Updating files: 100% (58593/58593), done.
Switched to a new branch 'build-net'
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3506 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3506 (offset 3 lines).
Hunk #2 succeeded at 3555 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3508 (offset 3 lines).
Hunk #2 succeeded at 3532 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3508 (offset 3 lines).
Hunk #2 succeeded at 3570 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3347 (offset 3 lines).
Hunk #2 succeeded at 3413 (offset 3 lines).
Hunk #3 succeeded at 3822 (offset 10 lines).
Checking patch src/coreclr/jit/emitriscv64.h...
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3825 (offset 10 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3347 (offset 3 lines).
Hunk #2 succeeded at 3367 (offset 3 lines).
Hunk #3 succeeded at 3457 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3478 (offset 3 lines).
Hunk #2 succeeded at 3516 (offset 3 lines).
Hunk #3 succeeded at 3822 (offset 10 lines).
Hunk #4 succeeded at 3901 (offset 10 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3428 (offset 3 lines).
Hunk #2 succeeded at 3531 (offset 3 lines).
Hunk #3 succeeded at 3908 (offset 10 lines).
Checking patch src/coreclr/jit/codegenriscv64.cpp...
Checking patch src/coreclr/jit/emitriscv64.cpp...
error: while searching for:
{
code_t code = emitInsCode(ins);if (INS_mov == ins)
{
assert(isGeneralRegisterOrR0(reg1));
assert(isGeneralRegisterOrR0(reg2));
error: patch failed: src/coreclr/jit/emitriscv64.cpp:588
error: src/coreclr/jit/emitriscv64.cpp: patch does not apply
Checking patch src/coreclr/jit/instrsriscv64.h...
error: while searching for:
INST(nop, "nop", 0, 0x00000013)
//// R_R
INST(mov, "mov", 0, 0x00000013)
////R_I
INST(lui, "lui", 0, 0x00000037)
error: patch failed: src/coreclr/jit/instrsriscv64.h:35
error: src/coreclr/jit/instrsriscv64.h: patch does not apply
Checking patch src/coreclr/jit/codegenriscv64.cpp...
Checking patch src/coreclr/jit/emitriscv64.cpp...
error: while searching for:
inline bool emitter::emitInsMayWriteToGCReg(instruction ins)
{
assert(ins != INS_invalid);return (ins <= INS_remuw) && (ins >= INS_mv) &&!(ins >= INS_jal && ins <= INS_bgeu && ins != INS_jalr) &&
(CodeGenInterface::instInfo[ins] & ST) == 0
?true:false;
error: patch failed: src/coreclr/jit/emitriscv64.cpp:141
error: src/coreclr/jit/emitriscv64.cpp: patch does not apply
Checking patch src/coreclr/jit/instrsriscv64.h...
error: while searching for:
INST(nop, "nop", 0, 0x00000013)
//// R_R
INST(mv, "mv", 0, 0x00000013)
////R_I
INST(lui, "lui", 0, 0x00000037)
error: patch failed: src/coreclr/jit/instrsriscv64.h:35
error: src/coreclr/jit/instrsriscv64.h: patch does not apply
Checking patch src/coreclr/jit/instrsriscv64.h...
error: while searching for:
INST(nop, "nop", 0, 0x00000013)
//// R_R
INST(mov, "mov", 0, 0x00000013)
////R_I
INST(lui, "lui", 0, 0x00000037)
error: patch failed: src/coreclr/jit/instrsriscv64.h:35
error: src/coreclr/jit/instrsriscv64.h: patch does not apply
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3360 (offset 3 lines).
Hunk #2 succeeded at 3373 (offset 3 lines).
Hunk #3 succeeded at 3524 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
Hunk #1 succeeded at 3540 (offset 3 lines).
Hunk #2 succeeded at 3562 (offset 3 lines).
Hunk #3 succeeded at 3587 (offset 3 lines).
Checking patch src/coreclr/jit/emitriscv64.cpp...
error: while searching for:
case 0x0: // ADDIW
printf("addiw %s, %s, %d\n", rd, rs1, imm12);return;case 0x1: // SLLIW
printf("slliw %s, %s, %d\n", rd, rs1, imm12 & 0x3f); // 6 BITS forSHAMTin RISCV64
return;case 0x5: // SRLIW & SRAIW
if(((code >>30) &0x1) ==0) { printf("srliw %s, %s, %d\n", rd, rs1, imm12 & 0x1f); // 5BITS for SHAMT in RISCV64 } else { printf("sraiw %s, %s, %d\n", rd, rs1, imm12 & 0x1f); // 5BITS for SHAMT in RISCV64 } return; default: printf("RISCV64 illegal instruction: 0x%08X\n", code); return; } } case 0x33:error: patch failed: src/coreclr/jit/emitriscv64.cpp:3614error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...error: while searching for: case 0x5: // SRLIW & SRAIW { static constexpr unsigned kLogicalShiftFunct7 = 0x00; static constexpr unsigned kArithmeticShiftFunct7 = 0x30; unsigned funct7 = (imm12 >> 5) & 0x7f; if (funct7 == kLogicalShiftFunct7)error: patch failed: src/coreclr/jit/emitriscv64.cpp:3631error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...error: while searching for: case 0x1: // SLLIW { unsigned funct7 = (imm12 >> 5) & 0x7f; // SLLI's instruction code's upper 7 bits have to be equal to zero if (funct7 == 0) { printf("slliw %s, %s, %d\n", rd, rs1, imm12 & 0x1f); // 5 BITS for SHAMT in RISCV64error: patch failed: src/coreclr/jit/emitriscv64.cpp:3617error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...Hunk #1 succeeded at 3563 (offset 3 lines).error: while searching for: return; case 0x5: // SRLIW & SRAIW { static constexpr unsigned kLogicalShiftFunct7 = 0x00; static constexpr unsigned kArithmeticShiftFunct7 = 0x20; unsigned funct7 = (imm12 >> 5) & 0x7f; if (funct7 == kLogicalShiftFunct7)error: patch failed: src/coreclr/jit/emitriscv64.cpp:3630error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...Hunk #1 succeeded at 3541 (offset 3 lines).error: while searching for: return; case 0x1: // SLLIW { unsigned funct7 = (imm12 >> 5) & 0x7f; // SLLIW's instruction code's upper 7 bits have to be equal to zero if (funct7 == 0) { printf("slliw %s, %s, %d\n", rd, rs1, imm12 & 0x1f); // 5 BITS for SHAMT in RISCV64 }error: patch failed: src/coreclr/jit/emitriscv64.cpp:3616error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...Hunk #1 succeeded at 3644 (offset -14 lines).Checking patch src/coreclr/jit/emitriscv64.cpp...Hunk #1 succeeded at 3733 (offset -14 lines).Checking patch src/coreclr/jit/emitriscv64.cpp...error: while searching for: break; case 0x1: // SLLI { static constexpr kSlliFunct6 = 0b000000; unsigned funct6 = (imm12 >> 6) & 0x3f; // SLLI's instruction code's upper 6 bits have to be equal to zeroerror: patch failed: src/coreclr/jit/emitriscv64.cpp:3538error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...error: while searching for: switch (opcode3) { case 0x0: // ADDW return; return; case 0x1: // SLLW printf("sllw %s, %s, %s\n", rd, rs1, rs2); return; case 0x5: // SRLW { return; default: return emitDispIllegalInstruction(code);error: patch failed: src/coreclr/jit/emitriscv64.cpp:3759error: src/coreclr/jit/emitriscv64.cpp: patch does not applyChecking patch src/coreclr/jit/emitriscv64.cpp...Hunk #1 succeeded at 3591 (offset 1 line).

@Bajtazar

Copy link
Copy Markdown
ContributorAuthor

Can you please fix the conflicts?

Conflicts have been fixed. Could you please review new changes?

@jakobbotsch
jakobbotsch merged commit d9bc680 into dotnet:mainMay 29, 2024
Ruihan-Yin pushed a commit to Ruihan-Yin/runtime that referenced this pull request May 30, 2024
* [RISC-V] Reworked emitDispInsName a bit to ease further development
* [RISC-V] Little improvements
* [RISC-V] Refactored code
* [RISC-V] Added mv and nop pseudoinstructions to disasm
* [RISC-V] Added branch pseudos to disasm
* [RISC-V] Removed dead code
* [RISC-V] Fixes
* [RISC-V] Added j pseudoinstruction to disasm
* [RISC-V] Improved readability
* [RISC-V] Fixed mov pseudoinstruction
* Revert "[RISC-V] Fixed mov pseudoinstruction"
This reverts commit a011c43.
* [RISC-V] Fixed mov printing name
* [RISC-V] After review changes
* [RISC-V] More fixes after review
* [RISC-V] Adjusted 32-bit shift disasm to changes
* [RISC-V] Fixed bug
* [RISC-V] Fixed comment
* [RISC-V] Changed constants' literal type
* [RISC-V] Added more constants
* [RISC-V] Reinforced printing 1
* [RISC-V] Reinforced printing 2
* [RISC-V] Fixed bug
* [RISC-V] Resolved more bugs
* [RISC-V] Removed dead assert
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Jun 29, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-riscvRelated to the RISC-V architecturearea-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIcommunity-contributionIndicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@Bajtazar@clamp03@risc-vv@tomeksowi@jakobbotsch@sirntar