From 0e788c985c678f3f9ca84c192cd0fd04df30d70d Mon Sep 17 00:00:00 2001 From: Xiang Wang Date: Wed, 1 Aug 2018 11:59:48 +0800 Subject: riscv: update the definition of intptr_t/uintptr_t MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These RISC-V ABIs defined by GCC : ilp32 ilp32d ilp32f lp64 lp64d lp64f. Through this we know that the length of the long's bit is equal to pointer. So update this code. This's more flexible. Change-Id: I16e1a2c12c6034df75dc360b65acb1b6affec49b Signed-off-by: Xiang Wang Reviewed-on: https://review.coreboot.org/27768 Reviewed-by: Jonathan Neuschäfer Tested-by: build bot (Jenkins) --- src/arch/riscv/include/stdint.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/arch/riscv/include/stdint.h b/src/arch/riscv/include/stdint.h index 19808662eb..76f0d1b778 100644 --- a/src/arch/riscv/include/stdint.h +++ b/src/arch/riscv/include/stdint.h @@ -70,8 +70,8 @@ typedef uint8_t bool; #define false 0 /* Types for `void *' pointers. */ -typedef s64 intptr_t; -typedef u64 uintptr_t; +typedef long intptr_t; +typedef unsigned long uintptr_t; /* FIXME: This is used in some print code and may be removed in the future. */ #define PRIu64 "llu" -- cgit v1.2.3