Skip to content

emitriscv64.cpp:4528:79: error: too many arguments to function call when building for riscv #122553

@omajid

Description

@omajid

Description

Building https://github.com/dotnet/dotnet at commit 9add30f0238eabacba9a92acec51a8d714fd1881 on x64 targeting riscv64 leads to this error:

$ ./build.sh /p:OfficialBuildId=20251212.1 -p:SkipUsingCrossgen=true --source-only --online /p:PortableBuild=true /p:TargetArchitecture=riscv64
...
    [ 75%] Building CXX object vm/wks/CMakeFiles/cee_wks_core.dir/__/versionresilienthashcode.cpp.o
    [ 75%] Building CXX object jit/static/CMakeFiles/clrjit_static.dir/__/emitriscv64.cpp.o
    [ 75%] Building CXX object vm/CMakeFiles/cee_dac.dir/precode_portable.cpp.o
    /workdir/dotnet/src/runtime/src/coreclr/jit/emitriscv64.cpp:4528:79: error: too many arguments to function call, expected 5, have 7
                        emitIns_R_AI(ins, attr, dataReg, addrReg, (size_t)offset, offset, addr->GetIconHandleFlag());
                        ~~~~~~~~~~~~                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /workdir/dotnet/src/runtime/src/coreclr/jit/emitriscv64.cpp:1231:15: note: 'emitIns_R_AI' declared here
    void emitter::emitIns_R_AI(instruction  ins,
                  ^
    1 error generated.
    make[2]: *** [jit/static/CMakeFiles/clrjit_static.dir/build.make:1629: jit/static/CMakeFiles/clrjit_static.dir/__/emitriscv64.cpp.o] Error 1
    make[1]: *** [CMakeFiles/Makefile2:4346: jit/static/CMakeFiles/clrjit_static.dir/all] Error 2
    make[1]: *** Waiting for unfinished jobs....

It also shows up here: https://github.com/filipnavara/dotnet-riscv/actions/runs/20131236400/job/57779850714#step:5:6460

Reproduction Steps

Build the VMR on x64 using: ./build.sh /p:OfficialBuildId=20251212.1 -p:SkipUsingCrossgen=true --source-only --online /p:PortableBuild=true /p:TargetArchitecture=riscv64

Expected behavior

Build works, like it did with VMR commit b5516cd93c4c00ab9bbdd4b92c9f1ab9dee051c8 (approx Dec 5)

Actual behavior

Build fails

Regression?

Yes. This was working recently.

Known Workarounds

No response

Configuration

No response

Other information

fyi @filipnavara @am11

Metadata

Metadata

Assignees

No one assigned

    Labels

    arch-riscvRelated to the RISC-V architecturearea-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions