aboutsummaryrefslogtreecommitdiff
path: root/test/real_mode/behavior.rs
diff options
context:
space:
mode:
Diffstat (limited to 'test/real_mode/behavior.rs')
-rw-r--r--test/real_mode/behavior.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/real_mode/behavior.rs b/test/real_mode/behavior.rs
index 30a7bd6..b2731da 100644
--- a/test/real_mode/behavior.rs
+++ b/test/real_mode/behavior.rs
@@ -1683,6 +1683,20 @@ mod kvm {
}
}
+ if instr.opcode() == Opcode::MOV {
+ if let Operand::Register { reg } = instr.operand(0) {
+ if reg.class() == register_class::S {
+ // mov to segment selector can #GP if the selector is invalid:
+ // > If the DS, ES, FS, or GS register is being loaded and the
+ // > segment pointed to is not a data or readable code segment.
+ //
+ // and even if the VM continues, results will be unpredictable with segment
+ // registers full of random data..
+ return true;
+ }
+ }
+ }
+
if instr.opcode() == Opcode::XCHG {
// TODO: don't understand why this "cared about dontcares"s...
return true;