Architecture Textbook 2 Flashcards
Conditional Branches
Instruction that tests value + allows for subsequent transfer of control to new address in program based on test outcome.
Basic Block
Sequence of instructions without branches (except potentially at end) + without branch targets or branch labels (except possibly at start). One of earliest phase of compilation is to break program into these.
Condition codes/flags
4 extra bits that record what happened during instruction. Negative (N), zero (Z), overflow (V) + carry (C).
Negative (N)
Result that set condition code had 1 in most signif bit.
Zero (Z)
Result that set condition code had 0 in most signif bit
Overflow (V)
Result that set condition code overflowed.
Carry (C)
Result that set condition code had carry out of most signif bit or borrow into most signif bit.
Branch Address Table/Branch Table
Table of addresses of alternative instruction sequences. e.g. case/switch statement.
Procedure/Function
Stored subroutine that performs specific task based on parameters it’s provided with. e.g. Method.
Branch-and-Link Instruction
Instruction that branches to address + simultaneously saves address of following instruction in register.
Return Address
Link to calling site that allows procedure to return to proper address. In LEGv8, stored as register.
Caller
Program that instigates procedure + provides necessary parameter values.
Callee
Procedure that executes series of stored instructions based on parameters provided by caller + returns control to caller.
Program Counter (PC)
Register containing address of instruction in program being executed.
Stack
Data structure for spilling registers organised as last in first out queue.
Stack Pointer
Value denoting most recently allocated address in stack that shows where registers should be spilled/where old register values can be found. In LEGv8, it’s register SP.
Push
Add element to stack.
Pop
Remove element from stack.