728x90
- All of the lines beginning with ‘.’ are directives to guide the assembler and linker
3.3 Data Formats
- Due to its origins as a 16-bit architecture that expanded into a 32-bit one, Intel uses the term “word” to refer to a 16-bit data type. Based on this, they refer to 32- bit quantities as “double words,” and 64-bit quantities as “quad words
3.4 Accessing Information
- An x86-64 central processing unit (CPU) contains a set of 16 general-purpose registers storing 64-bit values. These registers are used to store integer data as well as pointers
3.4.1 Operand Specifiers
Computer Systems GE
- ource values can be given as constants or read from registers or memory.
- he different operand possibilities can be classified into three types.
- The first type, immediate, is for constant values
- for example, $-577 or $0x1F. Different instructions allow different ranges of immediate values; the assembler will automatically select the most compact way of encoding a value
- The second type, register, denotes the contents of a register, one of the sixteen 8-, 4-, 2-, or 1-byte low-order portions of the registers for operands having 64, 32, 16, or 8 bits, respectively.
- The third type of operand is a memory reference, in which we access some memory location according to a computed address, often called the effective ad- dress.
- The most general form is shown at the bottom of the table with syntax Imm(rb,ri,s). Such a reference has four components: an immediate offset Imm, a base register rb, an index register ri, and a scale factor s, where s must be 1, 2, 4, or 8
728x90
'csapp' 카테고리의 다른 글
3.5 Arithmetic and Logical Operations (0) | 2023.04.10 |
---|---|
3.4.2 Data Movement Instructions (0) | 2023.04.08 |
3 Machine-Level Representation of Programs (0) | 2023.04.06 |
2.2.8 Advice on Signed versus Unsigned (0) | 2023.04.05 |
2.2.5 Signed versus Unsigned in C (0) | 2023.04.04 |
댓글