mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 23:41:23 +01:00
include: Add PRILX define to help print unsigned long
The unsigned long is always machine word size. This means it is 4 bytes on 32bit system and 8 bytes on 64bit system. This patch adds PRILX define for sbi_printf() which will help us print unsigned long without worrying whether it is 32bit or 64bit system. Signed-off-by: Anup Patel <anup.patel@wdc.com>
This commit is contained in:
@@ -29,11 +29,13 @@ typedef long s64;
|
||||
typedef unsigned long u64;
|
||||
typedef long int64_t;
|
||||
typedef unsigned long uint64_t;
|
||||
#define PRILX "016lx"
|
||||
#elif __riscv_xlen == 32
|
||||
typedef long long s64;
|
||||
typedef unsigned long long u64;
|
||||
typedef long long int64_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
#define PRILX "08lx"
|
||||
#else
|
||||
#error "Unexpected __riscv_xlen"
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user