Skip to content

Commit 0d92775

Browse files
authored
[RISCV] Use X_X0 instead of literal 0. NFC (llvm#158753)
1 parent 1dc8464 commit 0d92775

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lld/ELF/Arch/RISCV.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,7 @@ static void relaxCall(Ctx &ctx, const InputSection &sec, size_t i, uint64_t loc,
756756

757757
// When the caller specifies the old value of `remove`, disallow its
758758
// increment.
759-
if (remove >= 6 && rvc && isInt<12>(displace) && rd == 0) {
759+
if (remove >= 6 && rvc && isInt<12>(displace) && rd == X_X0) {
760760
sec.relaxAux->relocTypes[i] = R_RISCV_RVC_JUMP;
761761
sec.relaxAux->writes.push_back(0xa001); // c.j
762762
remove = 6;

0 commit comments

Comments
 (0)