Skip to content

Commit d000ce2

Browse files
JIT: Fix RISC-V emitter build (dotnet#118407)
1 parent 25c3d90 commit d000ce2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/coreclr/jit/emitriscv64.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1895,7 +1895,9 @@ unsigned emitter::emitOutputCall(const insGroup* ig, BYTE* dst, instrDesc* id)
18951895
}
18961896
}
18971897

1898-
return dst - origDst;
1898+
assert(dst > origDst);
1899+
assert((dst - origDst) <= UINT_MAX);
1900+
return (unsigned)(dst - origDst);
18991901
}
19001902

19011903
void emitter::emitJumpDistBind()

0 commit comments

Comments
 (0)