readability/writeability bit should not be checked in 64-bit mode
This commit is contained in:
parent
dcb0335ae9
commit
44a04a5fa3
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// $Id: descriptor.h,v 1.17 2006-08-31 18:18:15 sshwarts Exp $
|
||||
// $Id: descriptor.h,v 1.18 2007-09-26 19:09:10 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -169,9 +169,12 @@ union {
|
||||
#define IS_CODE_SEGMENT(type) (((type) >> 3) & 0x1)
|
||||
#define IS_CODE_SEGMENT_CONFORMING(type) (((type) >> 2) & 0x1)
|
||||
#define IS_DATA_SEGMENT_EXPAND_DOWN(type) (((type) >> 2) & 0x1)
|
||||
#define IS_CODE_SEGMENT_READABLE(type) (((type) >> 1) & 0x1)
|
||||
#define IS_DATA_SEGMENT_WRITEABLE(type) (((type) >> 1) & 0x1)
|
||||
#define IS_SEGMENT_ACCESSED(type) ( (type) & 0x1)
|
||||
|
||||
// readable/writeable bit is ignored when in 64-bit mode
|
||||
#define IS_CODE_SEGMENT_READABLE(type) (Is64BitMode() || (((type) >> 1) & 0x1))
|
||||
#define IS_DATA_SEGMENT_WRITEABLE(type) (Is64BitMode() || (((type) >> 1) & 0x1))
|
||||
|
||||
#define IS_SEGMENT_ACCESSED(type) ((type) & 0x1)
|
||||
|
||||
#define BX_SEGMENT_CODE (0x8)
|
||||
#define BX_SEGMENT_DATA_EXPAND_DOWN (0x4)
|
||||
|
@ -1,5 +1,5 @@
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// $Id: iret.cc,v 1.19 2007-09-10 20:47:08 sshwarts Exp $
|
||||
// $Id: iret.cc,v 1.20 2007-09-26 19:09:10 sshwarts Exp $
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2001 MandrakeSoft S.A.
|
||||
@ -279,7 +279,7 @@ BX_CPU_C::iret_protected(bxInstruction_c *i)
|
||||
IS_CODE_SEGMENT(ss_descriptor.type) ||
|
||||
!IS_DATA_SEGMENT_WRITEABLE(ss_descriptor.type))
|
||||
{
|
||||
BX_ERROR(("iret: SS AR byte not writable code segment"));
|
||||
BX_ERROR(("iret: SS AR byte not writable or code segment"));
|
||||
exception(BX_GP_EXCEPTION, raw_ss_selector & 0xfffc, 0);
|
||||
}
|
||||
|
||||
@ -540,7 +540,7 @@ BX_CPU_C::long_iret(bxInstruction_c *i)
|
||||
IS_CODE_SEGMENT(ss_descriptor.type) ||
|
||||
!IS_DATA_SEGMENT_WRITEABLE(ss_descriptor.type))
|
||||
{
|
||||
BX_ERROR(("iret64: SS AR byte not writable code segment"));
|
||||
BX_ERROR(("iret64: SS AR byte not writable or code segment: %d", ss_descriptor.type));
|
||||
exception(BX_GP_EXCEPTION, raw_ss_selector & 0xfffc, 0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user