Initial FENCE implementation
This commit is contained in:
@@ -112,6 +112,16 @@ pub(crate) fn find_and_exec(instr: Instruction, core: &mut Core) -> Result<(), E
|
|||||||
Err(IllegalInstruction)
|
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),
|
_ => Err(IllegalInstruction),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user