MIPS Instructios #2

charrrming·2022년 3월 30일

Computer Architecture

목록 보기
2/17

1. MIPS Instruction Fields

op (6비트, opcode that specifies the operation)
rs (5비트, first source operand 주소)
rt (5비트, second source operand 주소)
rd (5비트, destination register 주소)
shamt (5비트, shift amount)
funct (6비트, function code)

2. R-format instruction

• add rd, rs, rt
  add $t0, $s1, $s2 (t0 = s1 + s2)
  add -> opcode, funct
  $s1 -> rs
  $s2 -> rt
  $t0 -> rd
  sa -> 0
  
• sub rd, rs, rt
  sub $t2, $s3, $s4 (t2 = s3 - s4)

0개의 댓글