You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by bt...@apache.org on 2020/06/26 05:44:01 UTC

[incubator-nuttx] branch releases/9.1 updated: libs: rv64: Fix _calc_imm() in arch_elf.c

This is an automated email from the ASF dual-hosted git repository.

btashton pushed a commit to branch releases/9.1
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/releases/9.1 by this push:
     new 194734f  libs: rv64: Fix _calc_imm() in arch_elf.c
194734f is described below

commit 194734f49b181774a008e5017c882166efbde1da
Author: Masayuki Ishikawa <ma...@gmail.com>
AuthorDate: Thu Jun 25 14:54:27 2020 +0900

    libs: rv64: Fix _calc_imm() in arch_elf.c
---
 libs/libc/machine/risc-v/rv64/arch_elf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libs/libc/machine/risc-v/rv64/arch_elf.c b/libs/libc/machine/risc-v/rv64/arch_elf.c
index 259a22f..d27ac92 100644
--- a/libs/libc/machine/risc-v/rv64/arch_elf.c
+++ b/libs/libc/machine/risc-v/rv64/arch_elf.c
@@ -150,7 +150,7 @@ static void _calc_imm(long offset, long *imm_hi, long *imm_lo)
     {
       hi++;
     }
-  else if (r <= -2048)
+  else if (r < -2048)
     {
       hi--;
     }