This preview shows page 1. Sign up to view the full content.
Unformatted text preview: cified directly as a static value or through an address computation made up of one or more of the following components: Displacement -- An 8-bit, 16-bit, or 32-bit value. Base -- The value in a 32-bit (or 64-bit if REX.W is set) general-purpose register. Index -- The value in a 32-bit (or 64-bit if REX.W is set) general-purpose register. Scale factor -- A value of 2, 4, or 8 that is multiplied by the index value. The base and index value can be specified in one of sixteen available general-purpose registers in most cases. See Chapter 2, "Instruction Format," in the Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 3A. The following unique combination of address components is also available. RIP + Displacement In 64-bit mode, RIP-relative addressing uses a signed 32-bit displacement to calculate the effective address of the next instruction by sign-extend the 32-bit value and add to the 64-bit value in RIP. 3.7.6 Assembler and Compiler Addressing Modes At the machine-code level, the selected combination of displacement, base register, index register, and scale factor is encoded in an instruction. All assemblers permit a programmer to use any of the allowable combinations of these addressing components to address operands. High-level language compilers will select an appropriate 3-32 Vol. 1 BASIC EXECUTION ENVIRONMENT combination of these components based on the language construct a programmer defines. 3.7.7 I/O Port Addressing The processor supports an I/O address space that contains up to 65,536 8-bit I/O ports. Ports that are 16-bit and 32-bit may also be defined in the I/O address space. An I/O port can be addressed with either an immediate operand or a value in the DX register. See Chapter 13, "Input/Output," for more information about I/O port addressing. Vol. 1 3-33 BASIC EXECUTION ENVIRONMENT 3-34 Vol. 1 CHAPTER 4 DATA TYPES
This chapter introduces data types defined for the Intel 64 and IA-32 architectures. A section at the end of this chapter describes the real-number and floating-point concepts used in x87 FPU, SSE, SSE2, SSE3 and SSSE3 extensions. 4.1 FUNDAMENTAL DATA TYPES The fundamental data types are bytes, words, doublewords, quadwords, and double quadwords (see Figure 4-1). A byte is eight bits, a word is 2 bytes (16 bits), a doubleword is 4 bytes (32 bits), a quadword is 8 bytes (64 bits), and a double quadword is 16 bytes (128 bits). A subset of the IA-32 architecture instructions operates on these fundamental data types without any additional operand typing. 7 0 Byte N 15 8 7 0 High Low Byte Byte Word N+1 N 31 16 15 N+2 63 High Doubleword N+4 127 High Quadword N+8 64 63 Low Quadword N 32 31 Low Doubleword N 0 Double Quadword N 0 Quadword 0 High Word Low Word Doubleword Figure 4-1. Fundamental Data Types
The quadword data type was introduced into the IA-32 architecture in the Intel486 processor; the double quadword data type was introduced in the Pentium III processor with the SSE extensions...
View Full Document
This note was uploaded on 10/01/2013 for the course CPE 103 taught by Professor Watlins during the Winter '11 term at Mississippi State.
- Winter '11