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.
Leaf Procedures
Procedures that don’t call others.
Global Pointer
Register reserved to point to static area.
Procedure Frame/Activation Record
Segment of stack containing procedure’s saved registers + local variables.
Frame Pointer
Value denoting location of saved registers + local variables for given procedure. Some ARMv8 compilers use this to point to first doubleword of procedure frame.
Text Segment
Segment of UNIX object file that contains machine language code for routines in source file. Home of LEGv8 machine code.
Static Data Segment
Above code. Place for constants + other static variables..