You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/06/25 07:21:32 UTC

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

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

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


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

commit edd3dd316869d3ea42476426d9305a4608a00e40
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--;
     }