This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: 3 register operands addi $s1, $s2, 20 s1 = s2 + 20 Used to add constants data transfer lw $s1, 20($s2) s1 = Mem[s2 + 20] Word from memory to register sw $s1, 20($s2) Mem[s2 + 20] = s1 Word from register to memory lui $s1, 20 s1 = 20 * 2^16 Loads const into upper 16 bits logical and $s1, $s2, $s3 s1 = s2 & s3 Bit-by-bit AND or $s1, $s2, $s3 s1 = s2 | s3 Bit-by-bit OR nor $s1, $s2, $s3 s1 ~= (s2 | s3) Bit-by-bit NOR sll $s1, $s2, 10 s1 = s2 << 10 Shift left by constant srl $s1, $s2, 10 s1 = s2 >> 10 Shift right by constant conditional beq $s1, $s2, 25 if = go PC+4+100 PC relative branch branch bne $s1, $s2, 25 if ~ go PC+4+100 PC relative branch slt $s1, $s2, $s3 s1 = 1 if true : 0 Compare less than for beq, bne unconditional j 25 go to 100 Jump to target jump jr $ra go to return addr Procedure return jal 25 ra=PC+4; go to 100 For procedure call...
View Full Document
This note was uploaded on 11/30/2011 for the course ECEN 350 taught by Professor Sprintston during the Spring '09 term at Texas A&M.
- Spring '09