if (!(e2 & DESC_CS_MASK) || !(e2 & DESC_C_MASK)) {
/* if not conforming code, test rights */
- if (dpl < cpl || dpl < rpl)
+ if (dpl < cpl || dpl < rpl)
raise_exception_err(EXCP0D_GPF, selector & 0xfffc);
}
}
sp_mask = get_sp_mask(ss_e2);
/* validate data segments */
- validate_seg(R_ES, cpl);
- validate_seg(R_DS, cpl);
- validate_seg(R_FS, cpl);
- validate_seg(R_GS, cpl);
+ validate_seg(R_ES, rpl);
+ validate_seg(R_DS, rpl);
+ validate_seg(R_FS, rpl);
+ validate_seg(R_GS, rpl);
sp += addend;
}