Skip to content

Commit

Permalink
directly use syscall number macro
Browse files Browse the repository at this point in the history
For android/clang, we don't use gcc lib/header files.
So use __NR_riscv_flush_icache should be fine for all
of us.

Signed-off-by: Wang Chen <wangchen20@iscas.ac.cn>
Signed-off-by: McKnight22 <tao.wang.22@outlook.com>
  • Loading branch information
unicornx committed Feb 28, 2023
1 parent e48b893 commit 8284e6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/codegen/riscv/cpu-riscv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ void CpuFeatures::FlushICache(void* start, size_t size) {
// uintptr_t, end, uintptr_t, flags)
// The flag here is set to be SYS_RISCV_FLUSH_ICACHE_LOCAL, which is
// defined as 1 in the Linux kernel.
syscall(SYS_riscv_flush_icache, start, end, 1);
syscall(__NR_riscv_flush_icache, start, end, 1);
#endif // !USE_SIMULATOR.
}

Expand Down

0 comments on commit 8284e6b

Please sign in to comment.