Initial FENCE implementation

This commit is contained in:
2025-12-27 21:03:24 +01:00
parent 970c1adcb0
commit b5d36b7969

View File

@@ -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),
}
}