summaryrefslogtreecommitdiff
path: root/src/arch/riscv/include
diff options
context:
space:
mode:
authorXiang Wang <wxjstz@126.com>2018-08-01 11:59:48 +0800
committerMartin Roth <martinroth@google.com>2018-08-30 14:48:26 +0000
commit0e788c985c678f3f9ca84c192cd0fd04df30d70d (patch)
treeeb08f058dab31bddd350b858162525f9eb21ee12 /src/arch/riscv/include
parentb69ae97adafa301ef8e2186be0cb288194984182 (diff)
riscv: update the definition of intptr_t/uintptr_t
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 <wxjstz@126.com> Reviewed-on: https://review.coreboot.org/27768 Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/arch/riscv/include')
-rw-r--r--src/arch/riscv/include/stdint.h4
1 files changed, 2 insertions, 2 deletions
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"