diff options
author | Dino Li <Dino.Li@ite.com.tw> | 2020-01-16 16:23:18 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-01-22 07:32:10 +0000 |
commit | 5e2d7361a65ef43cb0465b1d7e17a1aadc8b8284 (patch) | |
tree | 870ccd967e992845a576b5f157353f1578fdff12 | |
parent | 739c21d1789f81415b6f0cef7bd65210262bb228 (diff) | |
download | chrome-ec-5e2d7361a65ef43cb0465b1d7e17a1aadc8b8284.tar.gz |
core/riscv-rv32i: enable software ctz
Because we don't support risc-v bit manipulation extension
(CLZ/CTZ instructions) yet, so we enable the software
implementation to fix build error while __ctzsi2 is called.
BUG=none
BRANCH=none
TEST=no build error.
Change-Id: If916010b9004f95aa4ccfd533be9539aff4c3f50
Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1982295
Reviewed-by: Jett Rink <jettrink@chromium.org>
-rw-r--r-- | core/riscv-rv32i/config_core.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/riscv-rv32i/config_core.h b/core/riscv-rv32i/config_core.h index 608fec3026..fe6135683d 100644 --- a/core/riscv-rv32i/config_core.h +++ b/core/riscv-rv32i/config_core.h @@ -10,7 +10,12 @@ #define BFD_ARCH riscv #define BFD_FORMAT "elf32-littleriscv" +/* + * The hardware doesn't support the risc-v bit manipulation + * extension (CLZ/CTZ instructions) so let's use the software implementation. + */ #define CONFIG_SOFTWARE_CLZ +#define CONFIG_SOFTWARE_CTZ #define CONFIG_SOFTWARE_PANIC #endif /* __CROS_EC_CONFIG_CORE_H */ |