이 강의는 instruction이 어떤 구성 요소로 이루어져 있는지와
각 field가 어떤 정보를 표현하는지를 다룬다.
명령어를 형식(format) 단위로 구분해 이해하는 것이 목적이다.
Instruction은 binary 형태로 표현되며,
CPU가 명령어를 해석하기 위해 필요한 정보들을 포함한다.
instruction은 다음 요소들로 구성된다.
Opcode: 수행할 operation 지정
Register field: source / destination register 지정
Immediate field: 상수 값 또는 offset 표현
Function field (funct): 세부 연산 구분
Instruction format은
이 field들이 어떻게 배치되는지를 정의한다.
instruction 형식
register-to-register operation
arithmetic / logical instruction에 사용
모든 operand가 register
immediate value 또는 memory access 포함
load, branch instruction에 사용
immediate field 포함
jump instruction에 사용
상대적으로 큰 address 범위를 표현
각 format은 instruction의 목적에 맞게 field 구성이 다르다.
Instruction은 operand의 위치를 지정하기 위해
addressing 방식을 사용한다.
강의자료에서 주로 다루는 addressing 방식은 다음과 같다.
Register addressing
Immediate addressing
Base + offset addressing
Addressing 방식에 따라 operand 접근 방식과 instruction 표현이 달라진다.
강의자료 4에서는 다음을 다룬다.
Instruction은 여러 field로 구성된 binary format을 가진다
Instruction format은 field 배치 방식에 따라 구분된다
R-type, I-type, J-type은 대표적인 instruction format이다
Addressing은 operand를 지정하는 방법이다