Fix Zifencei extension issue in RISC-V (#2807)

Refer to:
https://github.com/bytecodealliance/wasm-micro-runtime/pull/2805
This commit is contained in:
Huang Qi 2023-11-23 10:23:33 +08:00 committed by GitHub
parent 2175910bac
commit cb44e56b4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -177,7 +177,11 @@ rv_set_val(uint16 *addr, uint32 val)
*addr = (val & 0xffff);
*(addr + 1) = (val >> 16);
#ifdef __riscv_zifencei
__asm__ volatile("fence.i");
#else
__asm__ volatile("fence");
#endif
}
/* Add a val to given address */