assembler.symbols["%ss" % letter.lower()] = "SEGMENT_REG_%sS" % letter
# Add in symbols for the various checks of segment selectors.
- for check in ("NoCheck", "CSCheck", "CallGateCheck",
+ for check in ("NoCheck", "CSCheck", "CallGateCheck", "IntGateCheck",
"SSCheck", "IretCheck", "IntCSCheck"):
assembler.symbols[check] = "Seg%s" % check
uint64_t "ient, uint64_t &remainder);
enum SegmentSelectorCheck {
- SegNoCheck, SegCSCheck, SegCallGateCheck,
+ SegNoCheck, SegCSCheck, SegCallGateCheck, SegIntGateCheck,
SegSSCheck, SegIretCheck, SegIntCSCheck
};
}};
panic("CS checks for far calls/jumps through call gates"
"not implemented.\\n");
break;
+ case SegIntGateCheck:
+ if (desc.dpl < m5reg.cpl) {
+ return new GeneralProtection((uint16_t)selector);
+ }
+ break;
case SegSSCheck:
if (selector.si || selector.ti) {
if (!desc.p) {