명령어 사이즈 때문에 byte offset 고려할 필요 없음

  • 마지막 2 bit 항상 00 (필드 비트 낭비) (word 크기가 4바이트기 때문에)
    R, I, J 타입에서 마지막 2비트 00 아님; 주소 값이 항상 뒤에 00 붙는거 알기 때문에 생략. (https://en.wikibooks.org/wiki/MIPS_Assembly/MIPS_Details <- 가장 아래 ump 예시보면 있음)
  • 대상이 word-address , 4x 크기로 주소 공간 표현 (마지막 2bit 00 이기 때문)

PC-relative addressing for I-type

  • 목표 주소는 PC 기반으로 특정 (현재 명령어 주소)
  • Target address(32bit) = PC(32bit) + branch offset (16bit) <- I-type 16bit
  • 대부분 loop & if statements 2^16 words 보다 작음
  • In MIPS, PC = (PC + 4) + (branch address in word * 4)

Pseudo-direct Addressing for J-type

  • Target address PC 기반의 일부로 특정 ( 현재 명령어 주소)
  • Target address(32bit) = Upper 4 bits of PC (32bit) + branch offset (26bit) + 00

# 32 bit 길이 저장 방법

lui $t0, 255  : 상위 16비트 영역으로 올려줌

ori $t0, $t0, 2304 :하위 16 16비트 영역 채움

 

# 주소방법들

'공부 > CS' 카테고리의 다른 글

파이프라인 데이터페스  (0) 2023.06.28
MIPS 데이터 패스 구동 방식  (0) 2023.06.28
MIPS 함수 사용  (0) 2023.06.28
MIPS 명령어  (0) 2023.06.28
MIPS 레지스터 표  (0) 2023.06.28

+ Recent posts

let textNodes = document.querySelectorAll("div.tt_article_useless_p_margin.contents_style > *:not(figure):not(pre)"); textNodes.forEach(function(a) { a.innerHTML = a.innerHTML.replace(/`(.*?)`/g, '$1'); });