From 593f2d34bd632a9c9acd434d77865dd2a95fe7f7 Mon Sep 17 00:00:00 2001 From: t-mustafin <66252296+t-mustafin@users.noreply.github.com> Date: Wed, 6 Sep 2023 11:11:54 +0300 Subject: [PATCH] [RISC-V, LoongArch64] Fix assert(!regArgMaskLive) in genFnPrologCalleeRegArgs (#91414) * [LoongArch64] Fix assert(!regArgMaskLive) in genFnPrologCalleeRegArgs * [RISC-V] Fix assert(!regArgMaskLive) in genFnPrologCalleeRegArgs --- src/coreclr/jit/codegenloongarch64.cpp | 1 + src/coreclr/jit/codegenriscv64.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/coreclr/jit/codegenloongarch64.cpp b/src/coreclr/jit/codegenloongarch64.cpp index 33bd2a77486c6..bdef67f16595e 100644 --- a/src/coreclr/jit/codegenloongarch64.cpp +++ b/src/coreclr/jit/codegenloongarch64.cpp @@ -8625,6 +8625,7 @@ void CodeGen::genFnPrologCalleeRegArgs() (regNumber)regArg[i]); regArgNum--; regArgMaskLive &= ~genRegMask((regNumber)regArg[j]); + regArg[j] = 0; if (regArgNum == 0) { break; diff --git a/src/coreclr/jit/codegenriscv64.cpp b/src/coreclr/jit/codegenriscv64.cpp index 4b9c4119854cd..d4bd4dcab9b6d 100644 --- a/src/coreclr/jit/codegenriscv64.cpp +++ b/src/coreclr/jit/codegenriscv64.cpp @@ -7960,6 +7960,7 @@ void CodeGen::genFnPrologCalleeRegArgs() 0); regArgNum--; regArgMaskLive &= ~genRegMask((regNumber)regArg[j]); + regArg[j] = 0; } else if (k == i) { @@ -8037,6 +8038,7 @@ void CodeGen::genFnPrologCalleeRegArgs() (regNumber)regArg[i], (regNumber)regArg[i]); regArgNum--; regArgMaskLive &= ~genRegMask((regNumber)regArg[j]); + regArg[j] = 0; if (regArgNum == 0) { break;