577,581c577,585
< SegAttr attr = tc->readMiscRegNoEffect(MISCREG_SEG_ATTR(seg));
< if (!attr.writable && write)
< return new GeneralProtection(0);
< if (!attr.readable && !write && !execute)
< return new GeneralProtection(0);
---
> bool expandDown = false;
> if (seg >= SEGMENT_REG_ES && seg <= SEGMENT_REG_HS) {
> SegAttr attr = tc->readMiscRegNoEffect(MISCREG_SEG_ATTR(seg));
> if (!attr.writable && write)
> return new GeneralProtection(0);
> if (!attr.readable && !write && !execute)
> return new GeneralProtection(0);
> expandDown = attr.expandDown;
> }
584c588
< if (!attr.expandDown) {
---
> if (expandDown) {