CHECK_READ()/CHECK_WRITE() now handle code segments. Patch from Greatpsycho.
This commit is contained in:
parent
4c94ab07c9
commit
8fbebead19
1 changed files with 2 additions and 2 deletions
|
|
@ -38,14 +38,14 @@ int checkio(int port);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define CHECK_READ(seg, low, high) \
|
#define CHECK_READ(seg, low, high) \
|
||||||
if ((low < (seg)->limit_low) || (high > (seg)->limit_high)) \
|
if ((low < (seg)->limit_low) || (high > (seg)->limit_high) || ((msw & 1) && !(eflags & VM_FLAG) && (((seg)->access & 10) == 8))) \
|
||||||
{ \
|
{ \
|
||||||
x86gpf("Limit check", 0); \
|
x86gpf("Limit check", 0); \
|
||||||
return 1; \
|
return 1; \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define CHECK_WRITE(seg, low, high) \
|
#define CHECK_WRITE(seg, low, high) \
|
||||||
if ((low < (seg)->limit_low) || (high > (seg)->limit_high) || !((seg)->access & 2)) \
|
if ((low < (seg)->limit_low) || (high > (seg)->limit_high) || !((seg)->access & 2) || ((msw & 1) && !(eflags & VM_FLAG) && ((seg)->access & 8))) \
|
||||||
{ \
|
{ \
|
||||||
x86gpf("Limit check", 0); \
|
x86gpf("Limit check", 0); \
|
||||||
return 1; \
|
return 1; \
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue