Skip to content

Commit

Permalink
[RISC-V] Fix braces
Browse files Browse the repository at this point in the history
  • Loading branch information
clamp03 committed Oct 21, 2024
1 parent 722baf4 commit 51250ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/coreclr/jit/emitriscv64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1258,7 +1258,8 @@ void emitter::emitLoadImmediate(emitAttr size, regNumber reg, ssize_t imm)
INT32 high19 = ((int32_t)(high31 + 0x800)) >> 12;

emitIns_R_I(INS_lui, size, reg, high19);
if (high31 & 0xFFF) {
if (high31 & 0xFFF)
{
emitIns_R_R_I(INS_addiw, size, reg, reg, high31 & 0xFFF);
}

Expand Down
3 changes: 2 additions & 1 deletion src/coreclr/vm/riscv64/stubs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,8 @@ void StubLinkerCPU::EmitMovConstant(IntReg reg, UINT64 imm)

EmitLuImm(reg, high19);
int low12 = int(high31) << (32-12) >> (32-12);
if (low12) {
if (low12)
{
EmitAddImm(reg, reg, low12);
}

Expand Down

0 comments on commit 51250ae

Please sign in to comment.