Chapter 2 Vocab Flashcards
lui
load upper immediate
puts the upper 16 bits of a constant into a register, allowing a subsequent instruction to specify the lower 16 bits of the constant
$fp
frame pointer
a value denoting the location of the saved registers and local variables for a given procedure
$gp
global pointer
the register that is reserved for pointing to the static area
$sp
stack pointer
a value denoting the most recently allocated address in the stack that shows where registers should be spilled or where old register values can be found
(PC)
program counter
the register containing the address of the instruction in the program currently being executed
procedure frame
also called the activation record
the segment of the stack containing a procedure’s saved registers and local variables
data transfer instructions
a command that moves data between memory and registers (sw, lw)
PC-relative addressing
an addressing regime in which the address is the sum of the PC and a constant in the instruction
immediate addressing
the operand is a constant within the instruction itself
register addressing
the operand(s) is a register
base addressing
the operand is at the memory location whose address is the sum of a register and a constant in the instruction
instructions that use this:
- lw
- sw
pseudo-direct addressing
the jump address is the 26 bits of the instruction concatenated with the upper bit of the PC
instructions that use this:
- j
- jal
format:
op (6 bits) address (26 bits)
ble
branch on less than or equal (pseudo instruction)
ble rs, rt, Label
translates to: slt, bne
instruction set
the vocabulary of a computer’s language
stored-program concept
the idea that instructions and data of many types can be stored in memory as numbers
address
a value used to delineate the location of a specific data element within a memory array
offset
a constant value added to a base address to locate a particular element
alignment restriction
a requirement that data be aligned in memory on natural boundaries
spilling registers
the process of putting less commonly use variables into memory
overflow
when the results of an operation are larger than can be represented in a register
instruction format
a form of representation of an instruction composed of fields of binary numbers
machine language
a binary representation of machine instructions
machine code
a sequence of instructions in machine language
basic block
a sequence of instructions without branches (except maybe at the end) and without branch targets (except maybe at the beginning)
instruction
the words of a computer’s language
jump address table
also called jump table
a table of addresses of alternative instruction sequences
procedure
a stored subroutine that performs a specific task based on the parameters with which it is provided in the execution of a procedure
caller
the program that instigates a procedure and provides the necessary parameter values
callee
a procedure that executes a series of stored instructions based on parameters provided by the caller and then returns control to the caller
stack
a data structure for spilling registers organized as a last-in-first-out queue
addressing mode
one of several addressing regimes delimited by their varied use of operands and/or addresses
pseudo instruction
a common variation of assembly instructions often treated as if it were an instruction in its own right
symbol table
a table that matches names of label to the addresses of the memory that instructions occupy
linker
also called link editor
a systems program that combines independently assembled machine
linker
also called link editor
a systems program that combines independently assembled machine language programs and resolves any undefined labels into an executable file
executable file
a functional program in the format of an object file that contains no unresolved references
loader
a systems program that places an object program in main memory so that it is ready to execute
dynamically linked libraries
library routines that are linked to a program during execution
$ra
return address
a link to the calling site that allows a procedure to return to the proper address
word
the natural unit of access in a computer
consists of 4 bytes or 32 bits
base address
the starting address of an array in memory
conditional branch
an instruction that requires the comparison of two values and that allows for a subsequent transfer of control to a new address in the program based on the outcome of the comparison
$v#
value register
used for returning values from procedures
$v0 - $v1
ASCII
American Standard Code for Information Interchange
sll
shift left logical
this is the same as multiplying by 2^n
sll rd, rt, shamt
$at
assembler temporary
sc
store conditional
will store a new value only if no updates have occurred to the memory location since 11 was called
always used with ll
sc rt, offset(rs)
move
pseudo instruction
equivalent to add rd, rs, $zero
move rd, rs
blt
branch on less than (pseudo instruction)
equivalent to slt, bne
blt rs, rt, Label
bgt
branch on greater than (pseudo instruction)
equivalent to slt, beq
bgt rs, rt, Label
bge
branch on greater than or equal (pseudo instruction)
equivalent to slt, beq
bge rs, rt, Label
jal
jump and link
an instruction that jumps to an address and simultaneously saves the address of the following instruction in a register ($ra)
always used with jr
jr
jump register
an instruction that jumps to the register stored in $ra
always used with jal
registers
fast locations for data
base register
holds the base address of the array
least significant bit
right most bit
most significant bit
left most bit
two’s complement
a signed number representation where a leading 0 represents a positive number and a leading 1 represents a negative number
invert each bit then add 1
unconditional branch
an instruction that is always followed
$a#
argument registers
used to pass parameters to a procedure
$a0 - $a3
add
addition
register addressing
add rd, rs, rt
sub
subtraction
register addressing
sub rd, rs, rt
lw
load word
base addressing
lw rt, offset(base address)
sw
store word
base addressing
sw rt, offset(base address)
addi
add immediate
immediate addressing
addi rd, rs, immediate
srl
shift right logical
register addressing
srl rd, rs, shamt
bne
branch on not equal
PC-relative addressing
bne rs, rt, Label
beq
branch on equal
PC-relative addressing
beq rs, rt, Label
j
jump
pseudo-direct addressing
j Label
lb
load byte (1 byte)
lb rt, offset(base address)
sb
store byte (1 byte)
sb rt, offset(base address)
lh
load halfword (2 bytes)
lh rt, offset(base address)
sh
store halfword (2 bytes)
sh rt, offset(base address)
ll
load link
returns the current value of a memory location
always used with sc
ll rt, offset(rs)