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

[LoongArch64] fix the compiling errors by GCC. #89753

Merged
merged 1 commit into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/coreclr/jit/codegenloongarch64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8502,7 +8502,7 @@ void CodeGen::genFnPrologCalleeRegArgs()

assert(tmpArg <= REG_ARG_LAST);
assert(nextReg < MAX_REG_ARG);
assert(nextReg != i);
assert(nextReg != (unsigned)i);

regArg[i] = 0;
int count = 0;
Expand All @@ -8524,15 +8524,15 @@ void CodeGen::genFnPrologCalleeRegArgs()
count++;
}

if (nextReg == i)
if (nextReg == (unsigned)i)
{
GetEmitter()->emitIns_R_R_I(INS_ori, EA_PTRSIZE, REG_R21, (regNumber)tmpArg, 0);
regArgMaskLive &= ~genRegMask((regNumber)tmpArg);
assert(count > 0);
}
else if (count == 0)
{
tmpRegs[0] = i;
tmpRegs[0] = (unsigned)i;
regArg[i] = tmpArg;
}
else
Expand All @@ -8555,14 +8555,14 @@ void CodeGen::genFnPrologCalleeRegArgs()
assert(regArgNum >= 0);
} while (count >= 0);

if (nextReg == i)
if (nextReg == (unsigned)i)
{
instruction ins = (regArgMaskIsInt & (1 << regArg[i])) != 0 ? INS_slli_w : INS_ori;
GetEmitter()->emitIns_R_R_I(ins, EA_PTRSIZE, (regNumber)regArgInit[i], REG_R21, 0);
regArgNum--;
assert(regArgNum >= 0);
}
else if (tmpRegs[0] != i)
else if (tmpRegs[0] != (unsigned)i)
{
instruction ins = (regArgMaskIsInt & (1 << (i + REG_ARG_FIRST))) != 0 ? INS_slli_w : INS_ori;
GetEmitter()->emitIns_R_R_I(ins, EA_PTRSIZE, (regNumber)regArgInit[i],
Expand Down
6 changes: 2 additions & 4 deletions src/coreclr/vm/loongarch64/asmhelpers.S
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ WRITE_BARRIER_END JIT_ByRefWriteBarrier
// $t0 : trashed
// $t3 : trashed
// $t4 : trashed
// t6 : trashed (incremented by 8 to implement JIT_ByRefWriteBarrier contract)
// $t6 : trashed (incremented by 8 to implement JIT_ByRefWriteBarrier contract)
//
WRITE_BARRIER_ENTRY JIT_CheckedWriteBarrier

Expand Down Expand Up @@ -305,7 +305,6 @@ WRITE_BARRIER_END JIT_WriteBarrier
// Begin patchable literal pool
.balign 64 // Align to power of two at least as big as patchable literal pool so that it fits optimally in cache line
WRITE_BARRIER_ENTRY JIT_WriteBarrier_Table
wbs_begin:
wbs_card_table:
.quad 0
wbs_card_bundle_table:
Expand Down Expand Up @@ -382,8 +381,7 @@ NESTED_ENTRY ThePreStub, _TEXT, NoHandler
EPILOG_BRANCH_REG $t4
NESTED_END ThePreStub, _TEXT

// ------------------------------------------------------------------\

// ------------------------------------------------------------------
// EXTERN_C int __fastcall HelperMethodFrameRestoreState(
// INDEBUG_COMMA(HelperMethodFrame *pFrame)
// MachState *pState
Expand Down