aboutsummaryrefslogtreecommitdiff
path: root/test/real_mode
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2026-05-25 18:34:57 +0000
committeriximeow <me@iximeow.net>2026-05-25 18:37:44 +0000
commitb43f483a50f650dbf385d2d55d0d38171f08e32b (patch)
treebfbf698a96c68549c99ad2adb02a6bda54dcbc07 /test/real_mode
parent426d092da378cb271d084632a20865952da395c6 (diff)
dont clobber test VM control state in tests..
Diffstat (limited to 'test/real_mode')
-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;