Chapter 5 Notes

Instruction Set Architecture Level

bulletCompiler -> ISA -> Hardware
bulletBackward compatibility big deal for Intel
bulletDesign Guide
bulletISA instructions that can be implemented efficiently in current and future technologies
bulletProvide clean target for compiled code
bulletISA level code is what a compiler outputs
bulletMemory model
bulletregisters
bulletdata types
bulletavailable instructions, etc.

Memory Models

bulletCommon unit size is 8 bits -> byte
bullet4 byte or 8 byte "words"
bulletWords often aligned at natural boundaries
bulletLinear address space vs. data/program space
bulletKernel mode vs. user mode
bulletRegisters control execution, hold temp results, etc.
bulletSpecial purpose -> SP, PC, etc.
bulletGeneral purpose (RISC 32+)
bulletPSW (program status word) flags register
bulletN, Z, V (overflow), C (carry), A (aux carray), P (parity)
bulletMachine mode, trace bit, CPU priority, interruptable...

Instructions

bulletLoad
bulletStore
bulletMove
bulletArithmetic
bulletBoolean
bulletComparing / Branching

Data Types

bulletNumeric
bulletInteger (2's complement), signed / unsigned
bulletFloating point / Decimal
bulletNon-numeric
bulletChar 7 bit (ASCII), 16 bit (UNICODE)
bulletString
bulletBoolean
bulletPointer
bulletJVM
bulletsigned 8/16/32/64 bit integer
bulletfloat / double
bullet16 unicode char

Instruction Formats

bulletOpcode Operand (address) 0, 1, 2, 3 address instructions
bulletShorter better
bulletMemory bandwidth for fetching instructions still a problem
bulletSufficient room in the instruction to express all desired operations
bulletNumber of bits in address field? What does it address? byte, word?
bulletK bit opcode, N bit address (2^K operations, 2^N memory cells)
bulletExpanding opcode (pg 325)

JVM - Simple

bullet1 byte op code (256)
bulletSpecial 1 byte instructions for ILOAD, BIPUSH, ISTORE

Addressing

bulletOperands
bulletADD 2 sources, 1 destination (lots of bits)
bulletUse registers (address smaller (64 regs. = 6 bit address)
bulletUse destination same as source
bulletUse assumed destination (some reg.)
bulletStack based, 0 registers
bulletAddress Modes
bulletImmediate, address is the value
bulletDirect, address point to data
bulletRegister, address specifies a register
bulletRegister Indirect, address specifies a register that holds an address
bulletIndexed Addressing, register + offset
bulletBased Indexed, two registers added (+ optional offset?)
bulletStack Addressing

Flow of Control

bulletProcedures -> stack frames
bulletCo-routines -> Simulate parallel processing on a single CPU
bulletTraps -> Automatic procedure call due to some exceptional condition. Programmer does not need to constantly check in code.
bulletInterrupts
bulletAsynchronous to program execution, can occur any time, unrelated often to program logic
bulletShould be transparent - when completed the computer shold be return to prior state.
bulletInterrupts are often given priorities

Intel IA-65 (pages 388-396)

bulletBundles - EPIC, Explicitly Parallel Instruction Computing, the compiler tells the CPU what can be executed in parallel.
bulletConditional execution - every instruction is executed, at the end of the pipeline the instruction may be ignored.
bulletSpeculative loads