YYYEJI

[MIPS] Control Instruction 본문

Computer architectures

[MIPS] Control Instruction

YEJI ⍢ 2022. 9. 25. 12:02
728x90

① BEQ / BNE

16-bit Offset

 

 

② J

26-bit address

 

 

③ JR 

32-bit address

 

 

 

많은 거리를 jump하고 싶을 땐 많은 address를 가지고 있는 ③을 이용해라.

 

 

 

↓↓↓   BEQ / BNE  ↓↓↓

https://yyyeji.tistory.com/120

 

[CS] MIPS Conditional branch Instruction (BEQ, BNE)

① BEQ - Branch if Equal Ex) BEQ $s1, $s2, label # if($s1 == $s2) PC op = 4 rs = 17  rt = 18  offset (word count) $s1의 값과 $s2의 값이 같으면 label의 값이 계산되어서 PC에 들어갑니다. ② BNE - Br..

yyyeji.tistory.com

 

↓↓↓   J / JR  ↓↓↓

https://yyyeji.tistory.com/122

 

[CS] MIPS Unconditional Branch Instructions (Jump etc.)

JUMP 새로운 target 주소(PC)로 점프하는 instruction입니다. Ex) J label → PC = target address (Memory addressing mode와 굉장히 밀접한 관련이 있다.) op = 2 word address (Jump instruction의 op code는..

yyyeji.tistory.com

 

 

 

 

◡̈