################################################################################ ## ## Solution to LSU EE 3755 Fall 2001 Practice Final Problem 3 ## # Exam: http://www.ece.lsu.edu/ee3755/2001f/fep.pdf # Note: # # Instruction xxx changed on 9 December 2001: # # "wb_rd = rt" was changed to "wb_rd = 25". # # Instruction xxx # # Assembler Syntax: XXX ummed26 # $t9 <- uimmed26 # Or, more precisely: # gpr[25] = {6'd0, ir[25:0] }; # # In words, load a 26-bit immediate in to register $t9 ($25). xxx 0x123456 # Equivalent Code: lui $t9, 0x12 ori $t9, $t9, 0x3456 # # Instruction yyy # # Assembler Syntax: YYY rd, rs, (rt)+sa # rd <- rs + Mem[rt]; # rt <- rt + sa; # # In words, load rd with word at address rt. # Increment rt by sa. yyy $s4, $s3, ($t0)+4 # Equivalent Code: lw $at, 0($t0) addi $t0, $t0, 4 add $s4, $s3, $at # Instruction yyy is the less likely MIPS candidate because # it performs arithmetic /and/ it accesses memory.