Skip to content

Commit 1aded3f

Browse files
authored
[LoongArch64] fix the compiling errors by GCC. (#89753)
1 parent 2ac31f3 commit 1aded3f

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

src/coreclr/jit/codegenloongarch64.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -8502,7 +8502,7 @@ void CodeGen::genFnPrologCalleeRegArgs()
85028502

85038503
assert(tmpArg <= REG_ARG_LAST);
85048504
assert(nextReg < MAX_REG_ARG);
8505-
assert(nextReg != i);
8505+
assert(nextReg != (unsigned)i);
85068506

85078507
regArg[i] = 0;
85088508
int count = 0;
@@ -8524,15 +8524,15 @@ void CodeGen::genFnPrologCalleeRegArgs()
85248524
count++;
85258525
}
85268526

8527-
if (nextReg == i)
8527+
if (nextReg == (unsigned)i)
85288528
{
85298529
GetEmitter()->emitIns_R_R_I(INS_ori, EA_PTRSIZE, REG_R21, (regNumber)tmpArg, 0);
85308530
regArgMaskLive &= ~genRegMask((regNumber)tmpArg);
85318531
assert(count > 0);
85328532
}
85338533
else if (count == 0)
85348534
{
8535-
tmpRegs[0] = i;
8535+
tmpRegs[0] = (unsigned)i;
85368536
regArg[i] = tmpArg;
85378537
}
85388538
else
@@ -8555,14 +8555,14 @@ void CodeGen::genFnPrologCalleeRegArgs()
85558555
assert(regArgNum >= 0);
85568556
} while (count >= 0);
85578557

8558-
if (nextReg == i)
8558+
if (nextReg == (unsigned)i)
85598559
{
85608560
instruction ins = (regArgMaskIsInt & (1 << regArg[i])) != 0 ? INS_slli_w : INS_ori;
85618561
GetEmitter()->emitIns_R_R_I(ins, EA_PTRSIZE, (regNumber)regArgInit[i], REG_R21, 0);
85628562
regArgNum--;
85638563
assert(regArgNum >= 0);
85648564
}
8565-
else if (tmpRegs[0] != i)
8565+
else if (tmpRegs[0] != (unsigned)i)
85668566
{
85678567
instruction ins = (regArgMaskIsInt & (1 << (i + REG_ARG_FIRST))) != 0 ? INS_slli_w : INS_ori;
85688568
GetEmitter()->emitIns_R_R_I(ins, EA_PTRSIZE, (regNumber)regArgInit[i],

src/coreclr/vm/loongarch64/asmhelpers.S

+2-4
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ WRITE_BARRIER_END JIT_ByRefWriteBarrier
159159
// $t0 : trashed
160160
// $t3 : trashed
161161
// $t4 : trashed
162-
// t6 : trashed (incremented by 8 to implement JIT_ByRefWriteBarrier contract)
162+
// $t6 : trashed (incremented by 8 to implement JIT_ByRefWriteBarrier contract)
163163
//
164164
WRITE_BARRIER_ENTRY JIT_CheckedWriteBarrier
165165

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

385-
// ------------------------------------------------------------------\
386-
384+
// ------------------------------------------------------------------
387385
// EXTERN_C int __fastcall HelperMethodFrameRestoreState(
388386
// INDEBUG_COMMA(HelperMethodFrame *pFrame)
389387
// MachState *pState

0 commit comments

Comments
 (0)