Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
Tags
- CSS
- DS
- instruction
- DATAPATH
- computer
- data structure
- javascript
- php
- MIPS
- control
- Java
- Pipelining
- html
- DoM
- github
- MacOS
- python
- for
- function
- Algorithm
- XML
- architecture
- Linux
- system
- DB
- web
- react
- mysql
- while
- Class
Archives
- Today
- Total
YYYEJI
[MIPS] Unconditional Branch Instructions (Jump etc.) 본문
Computer architectures
[MIPS] Unconditional Branch Instructions (Jump etc.)
YEJI ⍢ 2022. 9. 25. 11:51728x90
JUMP - 16bits
새로운 target 주소(PC)로 점프하는 instruction입니다.
Ex) J label → PC = target address
(Memory addressing mode와 굉장히 밀접한 관련이 있다.)
op = 2 | word address |
(Jump instruction의 op code는 2)
Jump Register - 26bits
JR $ra # PC ← $ra
( $ra → 31 register)
op = 0 | rs = 31 | rt = 0 | rd = 0 | shamt = 0 | func = 8 |
(R type 이기 때문에 op code는 0)
(function code가 8이면 JR instruction)
($ra가 31번째 있기 때문에 rs가 31번)
(나머지는 0으로 채워줌)
Jump and Link - 32bits
JAL label # $ra ← PC; PC ← Target address
op = 3 | word address |
(PC에 값을 $ra에 잠깐 보관해두고, PC 값 target address니까 target addreess로 점프)
◡̈
'Computer architectures' 카테고리의 다른 글
[MacOS] QtSpim 설치하기 (0) | 2022.10.07 |
---|---|
[MIPS] Control Instruction (2) | 2022.09.25 |
[MIPS] Conditional branch Instruction (slt) (0) | 2022.09.25 |
[MIPS] Conditional branch Instruction (BEQ, BNE) (0) | 2022.09.25 |
[MIPS] Instruction (Load, Store) (0) | 2022.09.25 |