diff --git a/application/baremetal/benchmark/coremark/core_util.c b/application/baremetal/benchmark/coremark/core_util.c index 6727672d..a65b5774 100644 --- a/application/baremetal/benchmark/coremark/core_util.c +++ b/application/baremetal/benchmark/coremark/core_util.c @@ -170,22 +170,41 @@ ee_u16 crcu8(ee_u8 data, ee_u16 crc) } return crc; } + +#if (defined(__riscv_zicond) && !defined(__clang__)) +#pragma GCC push_options +#pragma GCC optimize("-fcode-hoisting") +#pragma GCC optimize("-ftree-vrp") +#endif ee_u16 crcu16(ee_u16 newval, ee_u16 crc) { crc = crcu8((ee_u8)(newval), crc); crc = crcu8((ee_u8)((newval) >> 8), crc); return crc; } +#if (defined(__riscv_zicond) && !defined(__clang__)) +#pragma GCC pop_options +#endif + ee_u16 crcu32(ee_u32 newval, ee_u16 crc) { crc = crc16((ee_s16) newval, crc); crc = crc16((ee_s16)(newval >> 16), crc); return crc; } + +#if (defined(__riscv_zicond) && !defined(__clang__)) +#pragma GCC push_options +#pragma GCC optimize("-fcode-hoisting") +#pragma GCC optimize("-ftree-vrp") +#endif ee_u16 crc16(ee_s16 newval, ee_u16 crc) { return crcu16((ee_u16)newval, crc); } +#if (defined(__riscv_zicond) && !defined(__clang__)) +#pragma GCC pop_options +#endif ee_u8 check_data_types() {