Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RISC-V] Update ABI doc #107286

Merged
merged 5 commits into from
Sep 16, 2024
Merged

[RISC-V] Update ABI doc #107286

merged 5 commits into from
Sep 16, 2024

Conversation

tomeksowi
Copy link
Contributor

Part of #84834, cc @dotnet/samsung

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Sep 3, 2024
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Sep 3, 2024
Copy link
Contributor

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

@risc-vv
Copy link

risc-vv commented Sep 3, 2024

57718fd is being scheduled for building and testing

GIT: 57718fd97ccd9f2bbe1cf36ec51b5851798bc5b9
REPO: dotnet/runtime
BRANCH: main

Release-CLR-build FAILED

buildinfo.json
${{details}}

Copy link

@bartlomiejko bartlomiejko left a comment

Choose a reason for hiding this comment

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

LGTM

@clamp03 clamp03 added the arch-riscv Related to the RISC-V architecture label Sep 3, 2024
@jkotas jkotas requested a review from jakobbotsch September 3, 2024 19:51
@@ -98,6 +102,10 @@ Just like native, AMD64 has implicit-byrefs. Any structure (value type in IL par

The AMD64 native calling conventions (Windows 64 and System V) require return buffer address to be returned by callee in RAX. JIT also follows this rule.

## RISC-V only: structs passed/returned according to hardware floating-point calling convention

Passing/returning structs according to hardware floating-point calling convention like native is currently supported only up to 16 bytes, ones larger than that differ from the standard ABI and are passed/returned according to integer calling convention (by implicit reference).
Copy link
Member

Choose a reason for hiding this comment

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

What's the reason for this difference?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TLDR, it's a bit of work for a nice-to-have and we're currently weeding out bugs and instabilities which are higher priority.

Supporting FP structs > 16 bytes entails we no longer can tell whether an argument is passed by implicit reference (or needs a return buffer) by looking at the struct size alone, we would have to:

  1. calculate FpStructInRegistersInfo to tell if it's eligible for passing according to floating-point calling convention (can be mitigated by caching the classification like on System-V),
  2. (for arguments only) even if 1. returns it's a legit FP struct, we'd still have to see if we have enough free registers to fit all fields, otherwise the struct is passed according to integer calling convention, which does cap the size of a struct passed by value to 16 bytes, so it can still be passed by reference.

My PoC in #101796 kind of supports that but at the cost of littering the code with #ifdef's, AFAIK no other architecture requires knowing register availability to tell if a parameter is passed by reference, including LoongArch with which we share a lot of ABI code. And ELT profiler currently has static scratch space for struct reconstruction, it would have to be precalculated. I also thought shuffle thunks would need work but knowing now #107282 (comment) that's not the case.

And I still would have to figure out what to do about this, being static it doesn't have the context which registers are free:

static BOOL IsArgPassedByRef(TypeHandle th)
{
LIMITED_METHOD_CONTRACT;
_ASSERTE(!th.IsNull());
// This method only works for valuetypes. It includes true value types,
// primitives, enums and TypedReference.
_ASSERTE(th.IsValueType());
size_t size = th.GetSize();
#ifdef TARGET_AMD64
return IsArgPassedByRef(size);
#elif defined(TARGET_ARM64)
// Composites greater than 16 bytes are passed by reference
return ((size > ENREGISTERED_PARAMTYPE_MAXSIZE) && !th.IsHFA());
#elif defined(TARGET_LOONGARCH64)
// Composites greater than 16 bytes are passed by reference
return (size > ENREGISTERED_PARAMTYPE_MAXSIZE);
#elif defined(TARGET_RISCV64)
return (size > ENREGISTERED_PARAMTYPE_MAXSIZE);
#else
PORTABILITY_ASSERT("ArgIteratorTemplate::IsArgPassedByRef");
return FALSE;
#endif
}

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, the RISCV calling convention is super complicated compared to everything else we have.

I think it would be fine to omit these complicated details from managed calling convention, and deal with these complicated cases in managed/unmanaged interop only.

Copy link
Member

Choose a reason for hiding this comment

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

What happens when one tries to use struct that is passed using floating point convention that is more than 16 bytes with managed/native interop?

If it does not work, it should be tracked by a bug. It needs to either throw an exception or work correctly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, the RISCV calling convention is super complicated compared to everything else we have.

Maybe I'm just used to RISC-V but it doesn't feel more complicated than System-V, ARM64, or their .NET interops. Any calling convention has quirks and padding is a common source of them as noticed in #104098, #88238, and probably many more.

I think it would be fine to omit these complicated details from managed calling convention, and deal with these complicated cases in managed/unmanaged interop only.

I'm thinking whether we need it in interops at all, it's a corner-case achievable only via extra padding and the user has an easy way out of explicitly passing by ref.

What happens when one tries to use struct that is passed using floating point convention that is more than 16 bytes with managed/native interop?

If it does not work, it should be tracked by a bug. It needs to either throw an exception or work correctly.

#107386

@@ -122,6 +130,8 @@ Primitive value types smaller than 32-bits are widened to 32-bits: signed small

Small primitive arguments have undefined upper bits. This can be different from the standard calling conventions that may require normalization (e.g. on ARM32 and Apple ARM64).

On RISC-V small primitive arguments are extended according to standard calling conventions.
Copy link
Member

@jkotas jkotas Sep 3, 2024

Choose a reason for hiding this comment

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

The managed calling convention leaves the upper bits of small primitive arguments undefined across all architectures. It does not match the native calling convention wrt. passing small types on number of other architectures.

Is there a value in RISC-V to be special on this point? Would be better to unify it?

Copy link
Contributor Author

@tomeksowi tomeksowi Sep 4, 2024

Choose a reason for hiding this comment

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

It's natural for RISC-V to have small primitives extended, it's cheaper to require that of the caller (it's free in case of load instructions) than to do 2 shifts for each argument every time in the callee, which we couldn't optimize out otherwise. Some care was already taken to properly extend small integers, e.g. in #93665 (comment) so we're almost there anyway. Without it we would have to create a special calling convention variant just for managed.

Is there a benefit of unifying it given each architecture strives to follow their own platform calling conventions?

Copy link
Member

Choose a reason for hiding this comment

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

Ok, sounds reasonable to me. It is another one of those things that make RISCV different.

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
@risc-vv
Copy link

risc-vv commented Sep 4, 2024

RISC-V Release-CLR-QEMU: 9397 / 9414 (99.82%)
=======================
      passed: 9397
      failed: 2
     skipped: 107
      killed: 15
------------------------
  TOTAL libs: 9521
 TOTAL tests: 9521
   REAL time: 46min 13s 591ms
=======================

Release-CLR-QEMU.md, Release-CLR-QEMU.xml, testclr_output.tar.gz

RISC-V Release-FX-QEMU: 553223 / 593676 (93.19%)
=======================
      passed: 553223
      failed: 342
     skipped: 1580
      killed: 40111
------------------------
  TOTAL libs: 256
 TOTAL tests: 595256
   REAL time: 2h 22min 2s 651ms
=======================

Release-FX-QEMU.md, Release-FX-QEMU.xml, testfx_output.tar.gz

Build information and links

GIT: ceeaf4c2148a520b8446bc5fd2e6c5faa15dcbde
CI: 7e8a0f59ee23fd1242925c55e405749bc144832d
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

# CORE_LIBS_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -s libs /p:EnableSourceLink=false
# CORE_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -s clr+libs+host /p:EnableSourceLink=false

# TESTCLR_BUILD_CMD
runtime/src/tests/build.sh -riscv64 -cross -Release -priority1 -p:UseLocalAppHostPack=true
# TESTCLR_CMD
python3 riscv-CI/goci/agent/TestRunner/run.py --core_root ./coreclr.Release/Tests/Core_Root --testhost ./testhost.Release --atest ./coreclr.Release --test ./ --log_dir ./logs  --timeout 2700 --log_level DEBUG
# TESTCLR_RUN
/godata/pipelines/Release-CLR-QEMU/logs/run_tests.log
cd "/_PATH_/_WITH_/_TEST_" && ROOTFS_DIR=/crossrootfs/riscv64 QEMU_LD_PREFIX=/crossrootfs/riscv64 __TestDotNetCmd=/godata/pipelines/Release-CLR-QEMU/testhost.Release/dotnet CORE_ROOT=/godata/pipelines/Release-CLR-QEMU/coreclr.Release/Tests/Core_Root  /usr/bin/time -f "exec_time: %e" ./_TEST_BINARY_

# TESTFX_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -rc Release -hc Release -lc Release -s libs.tests --testscope innerloop /p:EnableSourceLink=false /p:UseLocalAppHostPack=true
# TESTFX_CMD
python3 riscv-CI/goci/agent/TestRunner/run.py --corefx --testhost ./testhost.Release --atest ./corefx.Release --log_dir ./logs  --timeout 6000 --memlimit 4096 --jobs 16 --log_level DEBUG --xunit xunit.Release
# TESTFX_RUN
/godata/pipelines/Release-FX-QEMU/logs/run_tests.log
cp -R "/godata/pipelines/Release-FX-QEMU/xunit.Release"/* "/_PATH_/_WITH_/_TEST_"/ &&cd "/_PATH_/_WITH_/_TEST_" && ROOTFS_DIR=/crossrootfs/riscv64 QEMU_LD_PREFIX=/crossrootfs/riscv64 __TestDotNetCmd=/godata/pipelines/Release-FX-QEMU/testhost.Release/dotnet  /usr/bin/time -f "exec_time: %e" /godata/pipelines/Release-FX-QEMU/testhost.Release/dotnet exec   xunit.console.dll _TEST_BINARY_ -nologo -nocolor -notrait category=failing
RISC-V Release-CLR-QEMU: 9397 / 9414 (99.82%)
=======================
      passed: 9397
      failed: 2
     skipped: 107
      killed: 15
------------------------
  TOTAL libs: 9521
 TOTAL tests: 9521
   REAL time: 47min 21s 138ms
=======================

Release-CLR-QEMU.md, Release-CLR-QEMU.xml, testclr_output.tar.gz

RISC-V Release-FX-QEMU: 553223 / 593676 (93.19%)
=======================
      passed: 553223
      failed: 342
     skipped: 1580
      killed: 40111
------------------------
  TOTAL libs: 256
 TOTAL tests: 595256
   REAL time: 2h 22min 2s 651ms
=======================

Release-FX-QEMU.md, Release-FX-QEMU.xml, testfx_output.tar.gz

Build information and links

GIT: ceeaf4c2148a520b8446bc5fd2e6c5faa15dcbde
CI: 7e8a0f59ee23fd1242925c55e405749bc144832d
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

# CORE_LIBS_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -s libs /p:EnableSourceLink=false
# CORE_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -s clr+libs+host /p:EnableSourceLink=false

# TESTCLR_BUILD_CMD
runtime/src/tests/build.sh -riscv64 -cross -Release -priority1 -p:UseLocalAppHostPack=true
# TESTCLR_CMD
python3 riscv-CI/goci/agent/TestRunner/run.py --core_root ./coreclr.Release/Tests/Core_Root --testhost ./testhost.Release --atest ./coreclr.Release --test ./ --log_dir ./logs  --timeout 2700 --log_level DEBUG
# TESTCLR_RUN
/godata/pipelines/Release-CLR-QEMU/logs/run_tests.log
cd "/_PATH_/_WITH_/_TEST_" && ROOTFS_DIR=/crossrootfs/riscv64 QEMU_LD_PREFIX=/crossrootfs/riscv64 __TestDotNetCmd=/godata/pipelines/Release-CLR-QEMU/testhost.Release/dotnet CORE_ROOT=/godata/pipelines/Release-CLR-QEMU/coreclr.Release/Tests/Core_Root  /usr/bin/time -f "exec_time: %e" ./_TEST_BINARY_

# TESTFX_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -rc Release -hc Release -lc Release -s libs.tests --testscope innerloop /p:EnableSourceLink=false /p:UseLocalAppHostPack=true
# TESTFX_CMD
python3 riscv-CI/goci/agent/TestRunner/run.py --corefx --testhost ./testhost.Release --atest ./corefx.Release --log_dir ./logs  --timeout 6000 --memlimit 4096 --jobs 16 --log_level DEBUG --xunit xunit.Release
# TESTFX_RUN
/godata/pipelines/Release-FX-QEMU/logs/run_tests.log
cp -R "/godata/pipelines/Release-FX-QEMU/xunit.Release"/* "/_PATH_/_WITH_/_TEST_"/ &&cd "/_PATH_/_WITH_/_TEST_" && ROOTFS_DIR=/crossrootfs/riscv64 QEMU_LD_PREFIX=/crossrootfs/riscv64 __TestDotNetCmd=/godata/pipelines/Release-FX-QEMU/testhost.Release/dotnet  /usr/bin/time -f "exec_time: %e" /godata/pipelines/Release-FX-QEMU/testhost.Release/dotnet exec   xunit.console.dll _TEST_BINARY_ -nologo -nocolor -notrait category=failing
RISC-V Release-CLR-VF2: 9398 / 9414 (99.83%)
=======================
      passed: 9398
      failed: 1
     skipped: 107
      killed: 15
------------------------
  TOTAL libs: 9521
 TOTAL tests: 9521
   REAL time: 3h 5min 48s 273ms
=======================

Release-CLR-VF2.md, Release-CLR-VF2.xml, testclr_output.tar.gz

RISC-V Release-FX-VF2: 552750 / 594239 (93.02%)
=======================
      passed: 552750
      failed: 21
     skipped: 1466
      killed: 41468
------------------------
  TOTAL libs: 256
 TOTAL tests: 595705
   REAL time: 2h 30min 52s 571ms
=======================

Release-FX-VF2.md, Release-FX-VF2.xml, testfx_output.tar.gz

Build information and links

GIT: ceeaf4c2148a520b8446bc5fd2e6c5faa15dcbde
CI: 7e8a0f59ee23fd1242925c55e405749bc144832d
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

# CORE_LIBS_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -s libs /p:EnableSourceLink=false
# CORE_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -s clr+libs+host /p:EnableSourceLink=false

# TESTCLR_BUILD_CMD
runtime/src/tests/build.sh -riscv64 -cross -Release -priority1 -p:UseLocalAppHostPack=true
# TESTCLR_CMD
python3 riscv-CI/goci/agent/TestRunner/run.py --core_root ./coreclr.Release/Tests/Core_Root --testhost ./testhost.Release --atest ./coreclr.Release --test ./ --log_dir ./logs  --timeout 2700 --log_level DEBUG
# TESTCLR_RUN
/var/lib/go-agent/pipelines/Release-CLR-VF2/logs/run_tests.log
cd "/_PATH_/_WITH_/_TEST_" && __TestDotNetCmd=/var/lib/go-agent/pipelines/Release-CLR-VF2/testhost.Release/dotnet CORE_ROOT=/var/lib/go-agent/pipelines/Release-CLR-VF2/coreclr.Release/Tests/Core_Root  /usr/bin/time -f "exec_time: %e" ./_TEST_BINARY_

# TESTFX_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -rc Release -hc Release -lc Release -s libs.tests --testscope innerloop /p:EnableSourceLink=false /p:UseLocalAppHostPack=true
# TESTFX_CMD
python3 riscv-CI/goci/agent/TestRunner/run.py --corefx --testhost ./testhost.Release --atest ./corefx.Release --log_dir ./logs  --timeout 6000 --memlimit 4096 --jobs 8 --log_level DEBUG --xunit xunit.Release
# TESTFX_RUN
/var/lib/go-agent/pipelines/Release-FX-VF2/logs/run_tests.log
cp -R "/var/lib/go-agent/pipelines/Release-FX-VF2/xunit.Release"/* "/_PATH_/_WITH_/_TEST_"/ &&cd "/_PATH_/_WITH_/_TEST_" && __TestDotNetCmd=/var/lib/go-agent/pipelines/Release-FX-VF2/testhost.Release/dotnet  /usr/bin/time -f "exec_time: %e" /var/lib/go-agent/pipelines/Release-FX-VF2/testhost.Release/dotnet exec   xunit.console.dll _TEST_BINARY_ -nologo -nocolor -notrait category=failing
RISC-V Release-CLR-VF2: 9398 / 9414 (99.83%)
=======================
      passed: 9398
      failed: 1
     skipped: 107
      killed: 15
------------------------
  TOTAL libs: 9521
 TOTAL tests: 9521
   REAL time: 3h 2min 3s 536ms
=======================

Release-CLR-VF2.md, Release-CLR-VF2.xml, testclr_output.tar.gz

RISC-V Release-FX-VF2: 552750 / 594239 (93.02%)
=======================
      passed: 552750
      failed: 21
     skipped: 1466
      killed: 41468
------------------------
  TOTAL libs: 256
 TOTAL tests: 595705
   REAL time: 2h 30min 52s 571ms
=======================

Release-FX-VF2.md, Release-FX-VF2.xml, testfx_output.tar.gz

Build information and links

GIT: ceeaf4c2148a520b8446bc5fd2e6c5faa15dcbde
CI: 7e8a0f59ee23fd1242925c55e405749bc144832d
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

# CORE_LIBS_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -s libs /p:EnableSourceLink=false
# CORE_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -s clr+libs+host /p:EnableSourceLink=false

# TESTCLR_BUILD_CMD
runtime/src/tests/build.sh -riscv64 -cross -Release -priority1 -p:UseLocalAppHostPack=true
# TESTCLR_CMD
python3 riscv-CI/goci/agent/TestRunner/run.py --core_root ./coreclr.Release/Tests/Core_Root --testhost ./testhost.Release --atest ./coreclr.Release --test ./ --log_dir ./logs  --timeout 2700 --log_level DEBUG
# TESTCLR_RUN
/var/lib/go-agent/pipelines/Release-CLR-VF2/logs/run_tests.log
cd "/_PATH_/_WITH_/_TEST_" && __TestDotNetCmd=/var/lib/go-agent/pipelines/Release-CLR-VF2/testhost.Release/dotnet CORE_ROOT=/var/lib/go-agent/pipelines/Release-CLR-VF2/coreclr.Release/Tests/Core_Root  /usr/bin/time -f "exec_time: %e" ./_TEST_BINARY_

# TESTFX_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -rc Release -hc Release -lc Release -s libs.tests --testscope innerloop /p:EnableSourceLink=false /p:UseLocalAppHostPack=true
# TESTFX_CMD
python3 riscv-CI/goci/agent/TestRunner/run.py --corefx --testhost ./testhost.Release --atest ./corefx.Release --log_dir ./logs  --timeout 6000 --memlimit 4096 --jobs 8 --log_level DEBUG --xunit xunit.Release
# TESTFX_RUN
/var/lib/go-agent/pipelines/Release-FX-VF2/logs/run_tests.log
cp -R "/var/lib/go-agent/pipelines/Release-FX-VF2/xunit.Release"/* "/_PATH_/_WITH_/_TEST_"/ &&cd "/_PATH_/_WITH_/_TEST_" && __TestDotNetCmd=/var/lib/go-agent/pipelines/Release-FX-VF2/testhost.Release/dotnet  /usr/bin/time -f "exec_time: %e" /var/lib/go-agent/pipelines/Release-FX-VF2/testhost.Release/dotnet exec   xunit.console.dll _TEST_BINARY_ -nologo -nocolor -notrait category=failing

@@ -79,6 +81,8 @@ However, unlike native varargs, all floating point arguments are not promoted to

Managed varargs are not supported in .NET Core.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Managed varargs are not supported in .NET Core.
Managed varargs are not supported on Windows only.

The doc was not updated when managed varargs support was added on Windows in .NET Core 3.

Copy link
Member

Choose a reason for hiding this comment

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

Correct: are supported
Also clarify: is it supported on Windows ARM64?

@risc-vv
Copy link

risc-vv commented Sep 5, 2024

RISC-V Release-CLR-QEMU: 9396 / 9414 (99.81%)
=======================
      passed: 9396
      failed: 3
     skipped: 107
      killed: 15
------------------------
  TOTAL libs: 9521
 TOTAL tests: 9521
   REAL time: 57min 57s 659ms
=======================

Release-CLR-QEMU.md, Release-CLR-QEMU.xml, testclr_output.tar.gz

RISC-V Release-FX-QEMU: 555478 / 588557 (94.38%)
=======================
      passed: 555478
      failed: 320
     skipped: 1374
      killed: 32759
------------------------
  TOTAL libs: 256
 TOTAL tests: 589931
   REAL time: 2h 0min 21s 920ms
=======================

Release-FX-QEMU.md, Release-FX-QEMU.xml, testfx_output.tar.gz

Build information and links

GIT: bd54e5eaa8053372e25601ddf8f43dbfe20ad02a
CI: 7e8a0f59ee23fd1242925c55e405749bc144832d
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

# CORE_LIBS_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -s libs /p:EnableSourceLink=false
# CORE_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -s clr+libs+host /p:EnableSourceLink=false

# TESTCLR_BUILD_CMD
runtime/src/tests/build.sh -riscv64 -cross -Release -priority1 -p:UseLocalAppHostPack=true
# TESTCLR_CMD
python3 riscv-CI/goci/agent/TestRunner/run.py --core_root ./coreclr.Release/Tests/Core_Root --testhost ./testhost.Release --atest ./coreclr.Release --test ./ --log_dir ./logs  --timeout 2700 --log_level DEBUG
# TESTCLR_RUN
/godata/pipelines/Release-CLR-QEMU/logs/run_tests.log
cd "/_PATH_/_WITH_/_TEST_" && ROOTFS_DIR=/crossrootfs/riscv64 QEMU_LD_PREFIX=/crossrootfs/riscv64 __TestDotNetCmd=/godata/pipelines/Release-CLR-QEMU/testhost.Release/dotnet CORE_ROOT=/godata/pipelines/Release-CLR-QEMU/coreclr.Release/Tests/Core_Root  /usr/bin/time -f "exec_time: %e" ./_TEST_BINARY_

# TESTFX_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -rc Release -hc Release -lc Release -s libs.tests --testscope innerloop /p:EnableSourceLink=false /p:UseLocalAppHostPack=true
# TESTFX_CMD
python3 riscv-CI/goci/agent/TestRunner/run.py --corefx --testhost ./testhost.Release --atest ./corefx.Release --log_dir ./logs  --timeout 6000 --memlimit 4096 --jobs 16 --log_level DEBUG --xunit xunit.Release
# TESTFX_RUN
/godata/pipelines/Release-FX-QEMU/logs/run_tests.log
cp -R "/godata/pipelines/Release-FX-QEMU/xunit.Release"/* "/_PATH_/_WITH_/_TEST_"/ &&cd "/_PATH_/_WITH_/_TEST_" && ROOTFS_DIR=/crossrootfs/riscv64 QEMU_LD_PREFIX=/crossrootfs/riscv64 __TestDotNetCmd=/godata/pipelines/Release-FX-QEMU/testhost.Release/dotnet  /usr/bin/time -f "exec_time: %e" /godata/pipelines/Release-FX-QEMU/testhost.Release/dotnet exec   xunit.console.dll _TEST_BINARY_ -nologo -nocolor -notrait category=failing
RISC-V Release-CLR-VF2: 9397 / 9414 (99.82%)
=======================
      passed: 9397
      failed: 2
     skipped: 107
      killed: 15
------------------------
  TOTAL libs: 9521
 TOTAL tests: 9521
   REAL time: 3h 2min 44s 397ms
=======================

Release-CLR-VF2.md, Release-CLR-VF2.xml, testclr_output.tar.gz

RISC-V Release-FX-VF2: 535987 / 578998 (92.57%)
=======================
      passed: 535987
      failed: 23
     skipped: 1441
      killed: 42988
------------------------
  TOTAL libs: 256
 TOTAL tests: 580439
   REAL time: 2h 23min 5s 74ms
=======================

Release-FX-VF2.md, Release-FX-VF2.xml, testfx_output.tar.gz

Build information and links

GIT: bd54e5eaa8053372e25601ddf8f43dbfe20ad02a
CI: 7e8a0f59ee23fd1242925c55e405749bc144832d
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

# CORE_LIBS_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -s libs /p:EnableSourceLink=false
# CORE_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -s clr+libs+host /p:EnableSourceLink=false

# TESTCLR_BUILD_CMD
runtime/src/tests/build.sh -riscv64 -cross -Release -priority1 -p:UseLocalAppHostPack=true
# TESTCLR_CMD
python3 riscv-CI/goci/agent/TestRunner/run.py --core_root ./coreclr.Release/Tests/Core_Root --testhost ./testhost.Release --atest ./coreclr.Release --test ./ --log_dir ./logs  --timeout 2700 --log_level DEBUG
# TESTCLR_RUN
/var/lib/go-agent/pipelines/Release-CLR-VF2/logs/run_tests.log
cd "/_PATH_/_WITH_/_TEST_" && __TestDotNetCmd=/var/lib/go-agent/pipelines/Release-CLR-VF2/testhost.Release/dotnet CORE_ROOT=/var/lib/go-agent/pipelines/Release-CLR-VF2/coreclr.Release/Tests/Core_Root  /usr/bin/time -f "exec_time: %e" ./_TEST_BINARY_

# TESTFX_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -rc Release -hc Release -lc Release -s libs.tests --testscope innerloop /p:EnableSourceLink=false /p:UseLocalAppHostPack=true
# TESTFX_CMD
python3 riscv-CI/goci/agent/TestRunner/run.py --corefx --testhost ./testhost.Release --atest ./corefx.Release --log_dir ./logs  --timeout 6000 --memlimit 4096 --jobs 8 --log_level DEBUG --xunit xunit.Release
# TESTFX_RUN
/var/lib/go-agent/pipelines/Release-FX-VF2/logs/run_tests.log
cp -R "/var/lib/go-agent/pipelines/Release-FX-VF2/xunit.Release"/* "/_PATH_/_WITH_/_TEST_"/ &&cd "/_PATH_/_WITH_/_TEST_" && __TestDotNetCmd=/var/lib/go-agent/pipelines/Release-FX-VF2/testhost.Release/dotnet  /usr/bin/time -f "exec_time: %e" /var/lib/go-agent/pipelines/Release-FX-VF2/testhost.Release/dotnet exec   xunit.console.dll _TEST_BINARY_ -nologo -nocolor -notrait category=failing

@risc-vv
Copy link

risc-vv commented Sep 5, 2024

RISC-V Release-CLR-QEMU: 9396 / 9414 (99.81%)
=======================
      passed: 9396
      failed: 3
     skipped: 107
      killed: 15
------------------------
  TOTAL libs: 9521
 TOTAL tests: 9521
   REAL time: 57min 57s 659ms
=======================

Release-CLR-QEMU.md, Release-CLR-QEMU.xml, testclr_output.tar.gz

RISC-V Release-FX-QEMU: 624802 / 651562 (95.89%)
=======================
      passed: 624802
      failed: 321
     skipped: 1581
      killed: 26439
------------------------
  TOTAL libs: 256
 TOTAL tests: 653143
   REAL time: 1h 49min 55s 16ms
=======================

Release-FX-QEMU.md, Release-FX-QEMU.xml, testfx_output.tar.gz

Build information and links

GIT: 9624894e17648a4cc68ee47b7d0556de3f21fda4
CI: 7e8a0f59ee23fd1242925c55e405749bc144832d
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

# CORE_LIBS_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -s libs /p:EnableSourceLink=false
# CORE_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -s clr+libs+host /p:EnableSourceLink=false

# TESTCLR_BUILD_CMD
runtime/src/tests/build.sh -riscv64 -cross -Release -priority1 -p:UseLocalAppHostPack=true
# TESTCLR_CMD
python3 riscv-CI/goci/agent/TestRunner/run.py --core_root ./coreclr.Release/Tests/Core_Root --testhost ./testhost.Release --atest ./coreclr.Release --test ./ --log_dir ./logs  --timeout 2700 --log_level DEBUG
# TESTCLR_RUN
/godata/pipelines/Release-CLR-QEMU/logs/run_tests.log
cd "/_PATH_/_WITH_/_TEST_" && ROOTFS_DIR=/crossrootfs/riscv64 QEMU_LD_PREFIX=/crossrootfs/riscv64 __TestDotNetCmd=/godata/pipelines/Release-CLR-QEMU/testhost.Release/dotnet CORE_ROOT=/godata/pipelines/Release-CLR-QEMU/coreclr.Release/Tests/Core_Root  /usr/bin/time -f "exec_time: %e" ./_TEST_BINARY_

# TESTFX_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -rc Release -hc Release -lc Release -s libs.tests --testscope innerloop /p:EnableSourceLink=false /p:UseLocalAppHostPack=true
# TESTFX_CMD
python3 riscv-CI/goci/agent/TestRunner/run.py --corefx --testhost ./testhost.Release --atest ./corefx.Release --log_dir ./logs  --timeout 6000 --memlimit 4096 --jobs 16 --log_level DEBUG --xunit xunit.Release
# TESTFX_RUN
/godata/pipelines/Release-FX-QEMU/logs/run_tests.log
cp -R "/godata/pipelines/Release-FX-QEMU/xunit.Release"/* "/_PATH_/_WITH_/_TEST_"/ &&cd "/_PATH_/_WITH_/_TEST_" && ROOTFS_DIR=/crossrootfs/riscv64 QEMU_LD_PREFIX=/crossrootfs/riscv64 __TestDotNetCmd=/godata/pipelines/Release-FX-QEMU/testhost.Release/dotnet  /usr/bin/time -f "exec_time: %e" /godata/pipelines/Release-FX-QEMU/testhost.Release/dotnet exec   xunit.console.dll _TEST_BINARY_ -nologo -nocolor -notrait category=failing
RISC-V Release-CLR-VF2: 9397 / 9414 (99.82%)
=======================
      passed: 9397
      failed: 2
     skipped: 107
      killed: 15
------------------------
  TOTAL libs: 9521
 TOTAL tests: 9521
   REAL time: 3h 2min 44s 397ms
=======================

Release-CLR-VF2.md, Release-CLR-VF2.xml, testclr_output.tar.gz

RISC-V Release-FX-VF2: 548670 / 592477 (92.61%)
=======================
      passed: 548670
      failed: 21
     skipped: 1428
      killed: 43786
------------------------
  TOTAL libs: 256
 TOTAL tests: 593905
   REAL time: 2h 28min 48s 90ms
=======================

Release-FX-VF2.md, Release-FX-VF2.xml, testfx_output.tar.gz

Build information and links

GIT: 9624894e17648a4cc68ee47b7d0556de3f21fda4
CI: 7e8a0f59ee23fd1242925c55e405749bc144832d
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

# CORE_LIBS_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -s libs /p:EnableSourceLink=false
# CORE_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -s clr+libs+host /p:EnableSourceLink=false

# TESTCLR_BUILD_CMD
runtime/src/tests/build.sh -riscv64 -cross -Release -priority1 -p:UseLocalAppHostPack=true
# TESTCLR_CMD
python3 riscv-CI/goci/agent/TestRunner/run.py --core_root ./coreclr.Release/Tests/Core_Root --testhost ./testhost.Release --atest ./coreclr.Release --test ./ --log_dir ./logs  --timeout 2700 --log_level DEBUG
# TESTCLR_RUN
/var/lib/go-agent/pipelines/Release-CLR-VF2/logs/run_tests.log
cd "/_PATH_/_WITH_/_TEST_" && __TestDotNetCmd=/var/lib/go-agent/pipelines/Release-CLR-VF2/testhost.Release/dotnet CORE_ROOT=/var/lib/go-agent/pipelines/Release-CLR-VF2/coreclr.Release/Tests/Core_Root  /usr/bin/time -f "exec_time: %e" ./_TEST_BINARY_

# TESTFX_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -rc Release -hc Release -lc Release -s libs.tests --testscope innerloop /p:EnableSourceLink=false /p:UseLocalAppHostPack=true
# TESTFX_CMD
python3 riscv-CI/goci/agent/TestRunner/run.py --corefx --testhost ./testhost.Release --atest ./corefx.Release --log_dir ./logs  --timeout 6000 --memlimit 4096 --jobs 8 --log_level DEBUG --xunit xunit.Release
# TESTFX_RUN
/var/lib/go-agent/pipelines/Release-FX-VF2/logs/run_tests.log
cp -R "/var/lib/go-agent/pipelines/Release-FX-VF2/xunit.Release"/* "/_PATH_/_WITH_/_TEST_"/ &&cd "/_PATH_/_WITH_/_TEST_" && __TestDotNetCmd=/var/lib/go-agent/pipelines/Release-FX-VF2/testhost.Release/dotnet  /usr/bin/time -f "exec_time: %e" /var/lib/go-agent/pipelines/Release-FX-VF2/testhost.Release/dotnet exec   xunit.console.dll _TEST_BINARY_ -nologo -nocolor -notrait category=failing
RISC-V Release-CLR-VF2: 9398 / 9414 (99.83%)
=======================
      passed: 9398
      failed: 1
     skipped: 107
      killed: 15
------------------------
  TOTAL libs: 9521
 TOTAL tests: 9521
   REAL time: 3h 2min 55s 789ms
=======================

Release-CLR-VF2.md, Release-CLR-VF2.xml, testclr_output.tar.gz

RISC-V Release-FX-VF2: 548670 / 592477 (92.61%)
=======================
      passed: 548670
      failed: 21
     skipped: 1428
      killed: 43786
------------------------
  TOTAL libs: 256
 TOTAL tests: 593905
   REAL time: 2h 28min 48s 90ms
=======================

Release-FX-VF2.md, Release-FX-VF2.xml, testfx_output.tar.gz

Build information and links

GIT: 9624894e17648a4cc68ee47b7d0556de3f21fda4
CI: 7e8a0f59ee23fd1242925c55e405749bc144832d
REPO: dotnet/runtime
BRANCH: main
CONFIG: Release
LIB_CONFIG: Release

# CORE_LIBS_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -s libs /p:EnableSourceLink=false
# CORE_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -s clr+libs+host /p:EnableSourceLink=false

# TESTCLR_BUILD_CMD
runtime/src/tests/build.sh -riscv64 -cross -Release -priority1 -p:UseLocalAppHostPack=true
# TESTCLR_CMD
python3 riscv-CI/goci/agent/TestRunner/run.py --core_root ./coreclr.Release/Tests/Core_Root --testhost ./testhost.Release --atest ./coreclr.Release --test ./ --log_dir ./logs  --timeout 2700 --log_level DEBUG
# TESTCLR_RUN
/var/lib/go-agent/pipelines/Release-CLR-VF2/logs/run_tests.log
cd "/_PATH_/_WITH_/_TEST_" && __TestDotNetCmd=/var/lib/go-agent/pipelines/Release-CLR-VF2/testhost.Release/dotnet CORE_ROOT=/var/lib/go-agent/pipelines/Release-CLR-VF2/coreclr.Release/Tests/Core_Root  /usr/bin/time -f "exec_time: %e" ./_TEST_BINARY_

# TESTFX_BUILD_CMD
runtime/build.sh --arch riscv64 --cross -c Release -rc Release -hc Release -lc Release -s libs.tests --testscope innerloop /p:EnableSourceLink=false /p:UseLocalAppHostPack=true
# TESTFX_CMD
python3 riscv-CI/goci/agent/TestRunner/run.py --corefx --testhost ./testhost.Release --atest ./corefx.Release --log_dir ./logs  --timeout 6000 --memlimit 4096 --jobs 8 --log_level DEBUG --xunit xunit.Release
# TESTFX_RUN
/var/lib/go-agent/pipelines/Release-FX-VF2/logs/run_tests.log
cp -R "/var/lib/go-agent/pipelines/Release-FX-VF2/xunit.Release"/* "/_PATH_/_WITH_/_TEST_"/ &&cd "/_PATH_/_WITH_/_TEST_" && __TestDotNetCmd=/var/lib/go-agent/pipelines/Release-FX-VF2/testhost.Release/dotnet  /usr/bin/time -f "exec_time: %e" /var/lib/go-agent/pipelines/Release-FX-VF2/testhost.Release/dotnet exec   xunit.console.dll _TEST_BINARY_ -nologo -nocolor -notrait category=failing

Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

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

LGTM.

@dotnet/jit-contrib Could you please signoff as well?

@AndyAyersMS
Copy link
Member

@BruceForstall can you take a look?

@tomeksowi
Copy link
Contributor Author

@BruceForstall can you take a look?

@BruceForstall Ping.

Copy link
Member

@BruceForstall BruceForstall left a comment

Choose a reason for hiding this comment

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

Thank you for taking the time to keep this document up-to-date.

@BruceForstall BruceForstall merged commit 657f18d into dotnet:main Sep 16, 2024
13 checks passed
jtschuster pushed a commit to jtschuster/runtime that referenced this pull request Sep 17, 2024
* Update ABI doc

* Managed/native varargs are supported on Windows only

Co-authored-by: Jan Kotas <jkotas@microsoft.com>

* Add github issue links

* Update varargs link ref

* Managed varargs are supported on Windows only

---------

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
sirntar pushed a commit to sirntar/runtime that referenced this pull request Sep 30, 2024
* Update ABI doc

* Managed/native varargs are supported on Windows only

Co-authored-by: Jan Kotas <jkotas@microsoft.com>

* Add github issue links

* Update varargs link ref

* Managed varargs are supported on Windows only

---------

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
@github-actions github-actions bot locked and limited conversation to collaborators Oct 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-riscv Related to the RISC-V architecture area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants