Switched back to unsigned ints for RV32 CoreMark per spec. CM/MHz rises from 3.35 to 3.36

This commit is contained in:
David Harris 2024-04-17 04:01:25 -07:00
parent 3ea16c6057
commit 5fdf8dfbec
2 changed files with 3 additions and 3 deletions

View File

@ -12,7 +12,7 @@ sources=$(cmbase)/core_main.c $(cmbase)/core_list_join.c $(cmbase)/coremark.h \
$(PORT_DIR)/crt.S $(PORT_DIR)/encoding.h $(PORT_DIR)/util.h $(PORT_DIR)/syscalls.c $(PORT_DIR)/crt.S $(PORT_DIR)/encoding.h $(PORT_DIR)/util.h $(PORT_DIR)/syscalls.c
ABI := $(if $(findstring "64","$(XLEN)"),lp64,ilp32) ABI := $(if $(findstring "64","$(XLEN)"),lp64,ilp32)
#ARCH := rv$(XLEN)gc_zba_zbb_zbc #ARCH := rv$(XLEN)gc_zba_zbb_zbc
ARCH := rv$(XLEN)im_zicsr_zba_zbb_zbc ARCH := rv$(XLEN)im_zicsr_zba_zbb_zbs
#ARCH := rv$(XLEN)gc #ARCH := rv$(XLEN)gc
#ARCH := rv$(XLEN)imc_zicsr #ARCH := rv$(XLEN)imc_zicsr
#ARCH := rv$(XLEN)im_zicsr #ARCH := rv$(XLEN)im_zicsr

View File

@ -109,11 +109,11 @@ typedef unsigned short ee_u16;
typedef signed int ee_s32; typedef signed int ee_s32;
typedef double ee_f32; typedef double ee_f32;
typedef unsigned char ee_u8; typedef unsigned char ee_u8;
//typedef unsigned int ee_u32;
typedef signed int ee_u32; // replaced with signed to improve performance per https://github.com/sifive/benchmark-coremark/blob/master/linux64/core_portme.h#L102
#if (XLEN==64) #if (XLEN==64)
typedef signed int ee_u32; // replaced with signed to improve performance by avoiding zero extension in RV64 per https://github.com/sifive/benchmark-coremark/blob/master/linux64/core_portme.h#L102
typedef unsigned long long ee_ptr_int; typedef unsigned long long ee_ptr_int;
#else #else
typedef unsigned int ee_u32;
typedef ee_u32 ee_ptr_int; typedef ee_u32 ee_ptr_int;
#endif #endif
typedef size_t ee_size_t; typedef size_t ee_size_t;