CSCI 223 Quiz 4 Flashcards
ISA
Instruction Set Architecture - interface between software and hardware
ISA is considered (micro/macro)architecture
macroarchitecture
microarchitecture
implementation of macroarchitecture; not visible to software; can vary as long as it satisfies the macroarchitecture
system stack: software
problem, algorithm, program
system stack: hardware
microarchitecture, circuits, transistors
Moore’s Law
transistor counts double every 18-24 months on a single chip (means the performance will double)
PC (program counter)
contains the address of the next instruction to execute; called “%eip” (IA32) or “%rip” (x86-64)
register file
collection of registers; used to store heavily used program data
condition codes
store status information about most recent arithmetic operation; used for conditional branching
memory
byte addressable array; code, user data, some OS data; includes stack used to support procedures
three basic operations of machine instructions
- arithmetic and logic operation (ALU)
- memory operation (AKA data movement)
- control-flow operation
x86 is a (CISC/RISC) type
CISC
CISC
Complex Instruction Set Computers; large number of instructions, varying instruction length, various addressing formats, complex compiler and hardware, compact code size
RISC
Reduced Instruction Set Computers; smaller number of instructions, fixed instruction length, only a few addressing formats, simpler compiler and hardware, larger code size
assembly data types
integer data (including memory address), floating point data; no aggregate types such as arrays or structures, just continuously allocated bytes in memory
assembly operations
perform arithmetic/logical function on register or memory data, transfer data b/w memory and register, transfer control
disassembler
useful tool for examining object code; analyses bit pattern of series of instructions, produces approximate rendition of assembly code, can be run on either a.out (complete executable) or .o file
x86-64 Integer registers
supposed to contain integer value or memory address; can reference low-order 4 bytes; controlled by compiler; 16 registers
IA32 integer registers
8 integer registers (first 6 - general purpose, %esp: stack pointer, %ebp: base pointer); can reference low-order 1 byte, 2 bytes, and 4 bytes; 16-bit registers with backwards compatibility
operand types
immediate, register, memory
immediate operand type
constant integer data; like C constant, but prefixed w/ ‘$’; encoded with 1, 2, or 4 bytes
register operand type
one of 16 integer registers; %rsp reserved for special use; others have special uses for particular instructions
memory operand type
8 consecutive bytes of memory at address given by register; various other “address modes”