Intel architecture ia-32 User Manual

Page of 636
Vol. 3A 3-15
PROTECTED-MODE MEMORY MANAGEMENT
L (64-bit code segment) flag
In IA-32e mode, bit 21 of the second doubleword of the segment descriptor
indicates whether a code segment contains native 64-bit code. A value of 1
indicates instructions in this code segment are executed in 64-bit mode. A
value of 0 indicates the instructions in this code segment are executed in
compatibility mode. If L-bit is set, then D-bit must be cleared. When not in
IA-32e mode or for non-code segments, bit 21 is reserved and should always
be set to 0.
Available and reserved bits
Bit 20 of the second doubleword of the segment descriptor is available for use
by system software.
3.4.5.1
Code- and Data-Segment Descriptor Types
When the S (descriptor type) flag in a segment descriptor is set, the descriptor is for either a code
or a data segment. The highest order bit of the type field (bit 11 of the second double word of
the segment descriptor) then determines whether the descriptor is for a data segment (clear) or
a code segment (set). 
For data segments, the three low-order bits of the type field (bits 8, 9, and 10) are interpreted as
accessed (A), write-enable (W), and expansion-direction (E). See Table 3-1 for a description of
the encoding of the bits in the type field for code and data segments. Data segments can be read-
only or read/write segments, depending on the setting of the write-enable bit. 
Table 3-1.  Code- and Data-Segment Types 
Type Field
Descriptor
Type
Description
Decimal
11
10
E
9
W
8
A
0
1
2
3
4
5
6
7
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
Data
Data
Data
Data
Data
Data
Data
Data
Read-Only
Read-Only, accessed
Read/Write
Read/Write, accessed
Read-Only, expand-down
Read-Only, expand-down, accessed
Read/Write, expand-down
Read/Write, expand-down, accessed
C
R
A
8
9
10
11
12
13
14
15
1
1
1
1
1
1
1
1
0
0
0
0
1
1
1
1
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
Code
Code
Code
Code
Code
Code
Code
Code
Execute-Only
Execute-Only, accessed
Execute/Read
Execute/Read, accessed
Execute-Only, conforming
Execute-Only, conforming, accessed
Execute/Read-Only, conforming
Execute/Read-Only, conforming, accessed