CSE 2421 Final Exam Review

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/140

encourage image

There are no tags or description

Looks like no tags are added yet.

141 Terms

1
New cards

A 64 bit register the CPU uses to put addresses for memory accesses on the address bus

Memory Address Register (MAR)

2
New cards

A 64 bit register which the CPU uses to put data on the data bus for writes, or to retrieve data from the data bus for reads from memory

Memory Data Register (MDR)

3
New cards

A collection of intertwined hardware and systems software that must cooperate in order to achieve the ultimate goal of running application programs

System

4
New cards

A directive needed by the linker for symbol resolution, followed by the name of the function

.globl

5
New cards

A logic element that does not store state, the output depends only on the current input

Combinatorial Logic Element

6
New cards

A logic element that is capable of storing state, has memory and can store prior states

Sequential (clocked) Logic Element

7
New cards

A method of optimizing a processor by predicting what instructions will be computed next

Speculative execution

8
New cards

A requirement of the x86-64 ABI, should be satisfied prior to any call.

stack alignment

9
New cards

A value too large for representation

overflow

10
New cards

A value too small to be represented, not as serious because it's comparable to a loss of precision, which can be approximated by zero.

underflow

11
New cards

Address displacement syntax

displacement (src, index, scale)

12
New cards

Adds first argument to second argument

add

13
New cards

Allows a name to be assigned to the assembly language source code file

.file

14
New cards

Arithmic logic unit, sets the condition flags

ALU

15
New cards

.byte data size

1 byte (8 bits)

16
New cards

Changes or sets the current section to the data section

.data

17
New cards

Changes or sets the current section to the text (or code) section

.text

18
New cards

changing a given bit pattern to a related one

Data Transformation

19
New cards

chips that reside on the motherboard

Controller

20
New cards

Computes address math, does not touch memory or affect condition codes

lea

21
New cards

Computes bitwise NOT

not

22
New cards

Computes bitwise OR

or

23
New cards

Computes bitwise XOR

xor

24
New cards

Computes biwise AND

and

25
New cards

Data called by the program that is likely to be called again, EX: indexes in for loops

Temporal Locality

26
New cards

Do displacements require dollar signs?

No

27
New cards

Does the stack grow towards higher or lower addresses?

Lower

28
New cards

Dynamic Ram, slow memory dense needs constant refresh

DRAM

29
New cards

faster than addq one

inc

30
New cards

faster than subq one

dec

31
New cards

Holds static variables in the file scope

Heap

32
New cards

How do you access a member of a structure?

use leaq to find the address, imulq may be needed

33
New cards

How do you access an array that is a member of a structure?

use leaq to find the address, displacement is needed for index

34
New cards

How do you allocate space on the stack?

Subtract from rsp

35
New cards

How do you call malloc in assembler?

put size in rdi and call malloc

36
New cards

How do you go to the value that a memory expression points to in x86-64 ASM?

Use () (this is a memory reference)

37
New cards

How does call figure out what the return address is?

call pushes the return address of the next call instruction

38
New cards

How does lea compute addresses?

lea uses displacement(base,index,scale) formula

39
New cards

How does someone allocate space on the stack?

Move the stack pointer (subq $40, %rsp)

40
New cards

How many registers are in a 64 bit architecture?

16

41
New cards

If a particular piece of data is accessed, nearby addresses are also likely to be accessed. Ex: arrays

Spatial Locality

42
New cards

If we don't ______, we don't know what.

Measure

43
New cards

If we don't ______, we don't know where.

Profile

44
New cards

In what order are multidimensional (nested) arrays created?

Row major order

45
New cards

increment a register

inc

46
New cards

Keeps track of what instruction being executed

Program Counter (PC)

47
New cards

Keyboards, mouse, etc

I/O Devices

48
New cards

Larger memory sizes take more time to access and vice versa.

Memory Hierarchy

49
New cards

.long data size

4 bytes

50
New cards

Memory that can maintain its value without power

Non-Volatile Memory

51
New cards

Moves a value onto the stack, subtracts quad value to rsp

push

52
New cards

moving data from one system component to another, or within a given component

Data Movement

53
New cards

movq %rsp, %rbp; pop %rbp

leave

54
New cards

Needed by the linker to identify the label as one associated with a function, as opposed to data

.type

55
New cards

Needed by the linker to identify the size of the text for the program

.size

56
New cards

older version of call, not really all that useful because it's slower than other instructions that do the same thing

enter

57
New cards

opcode conditional move

cmov

58
New cards

opcode for unconditional jump

jmp

59
New cards

opcode to jump when equal

je

60
New cards

opcode to jump when not equal

jne

61
New cards

opcode to move and sign extend as it moves

movs

62
New cards

opcode to move and zero extend as it moves

movz

63
New cards

opcode to move data from one register to another

mov

64
New cards

opcode to shift in the sign bit

sar

65
New cards

opcode to shift left

shl

66
New cards

opcode to shift right

shr

67
New cards

opcode to shift right, add in 0's

shr

68
New cards

Parameter order for registers

rdi, rsi, rdx, rcx, r8, r9

69
New cards

Pluggable slot on the motherboard

Adapter

70
New cards

.quad data size

8 bytes

71
New cards

Registers that push values to the stack to be used later

callee-saved register

72
New cards

Removes a value from the stack, adds quad value to rsp

pop

73
New cards

Scratch pad register that will get trashed at function calls

caller-saved register

74
New cards

Sets the flags for SF, ZF, and PF, discards result of bitwise AND

test

75
New cards

Sets the flags, subtracts first argument from second argument

cmp

76
New cards

Similar to preprocessor directives in C, provides information helpful to execution of the file

Assembler Directives

77
New cards

Specifies that the characters enclosed in quotation marks are to be stored in memory, terminated by a null byte

.string

78
New cards

Specifies that the following data is to be placed in the read only memory portion of the executable

.rodata

79
New cards

Static ram, fast, memory intensive

SRAM

80
New cards

Storage held within processor

Cache

81
New cards

storing digital data in a form which balances considerations of cost, reliability, and access speed

Data Storage

82
New cards

Subtracts first argument from second argument

sub

83
New cards

Temp storage for applications being exceuted. SRAM and DRAM

Main Memory

84
New cards

The abstraction of hardware, what our software must comply with

Instruction Set Architecture (ISA)

85
New cards

The execution of a computer program using one or more threads

Process

86
New cards

The style used for floating point math

IEEE 754

87
New cards

This file format compines .o, .out, and .so into a single linking file

Executable Linkage Format (ELF)

88
New cards

This is used by the OS to manage each process in the system

Process Control Block (PCB)

89
New cards

This kind of memory storage is used for the stack, does not allow for direct memory access.

LIFO storage

90
New cards

This makes the specified section the current section

.section (this is important!!)

91
New cards

This register keeps track of the current instruction

Instruction Register (IR)

92
New cards

This storage location has no direct memory access

Stack

93
New cards

Transfers control to a function, uses the parameters in the parameter registers to execute the function as needed

call

94
New cards

Transfers control to the return address located on the stack. This address is usually placed on the stack by a call instruction. This transfers control to the calling function at the instruction following the call.

ret

95
New cards

transfers data between system components or within system components

Bus

96
New cards

This opcode is used for scales not in 1, 2, 4, or 8 bytes.

imul

97
New cards

We have a struct s with members:

{

char name[23];

int age;

int stuff[2];

double height;

int friends;

}

What's the size of the struct?

56 bytes

98
New cards

What are the stack housekeeping calls after a function body is executed?

leave, ret

99
New cards

What are the stack housekeeping calls before a function body is executed?

pushq %rbp, followed by movq rsp, rbp. this makes our stack frame

100
New cards

What coding style is pipeline friendly?

branchless code