diff --git a/src/instructions.rs b/src/instructions.rs index 8e55d37..e7b95f1 100644 --- a/src/instructions.rs +++ b/src/instructions.rs @@ -112,6 +112,16 @@ pub(crate) fn find_and_exec(instr: Instruction, core: &mut Core) -> Result<(), E Err(IllegalInstruction) } } + 0b00011 => match instr.funct3() { + // MISC_MEM + 0b000 => { + // FENCE is just implemented as a SeqCst fence always here + // I dont yet care about the potential performance issue this may bring + std::sync::atomic::fence(std::sync::atomic::Ordering::SeqCst); + Ok(()) + } + _ => Err(IllegalInstruction), + }, _ => Err(IllegalInstruction), } }