chi-chi_mid1

chi-chi_mid1 - I-type: opcode(6)-rs(5)-rt(5)-immediate(16)...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 MIPS Command: # N=number, L=label, A=address regular: ($$) move (L) j, jal, jr $ra Arithmetic: ($$$)add, sub, mul, div ($$N)addi,rem($st=$nd%N), ($N)li bitwise: ($$$)and, or, xor, nor ($$N)andi, ori, sll(<<N), srl(>>N) branch: ($$L)beq(==),bne(!=),blt(<),ble(<=),bgt(>),bge(>=) ($$$)slt($=1,if $<$), ($$N)slti memory: lb $t1, 0($t0), sb $t1, 0($t0) lw $t1, 0($t0), sw $t1, 0($t0) declaring variables: .data: c: .byte 0 #char c=0 a: .byte 0 1 2 #char a[3]={0,1,2} b: .space 50 #char b[50] .text: main:. ..... memory-mapped I/O: sw $reg, 0xffff0080($0) Format: R-type: opcode(6)-rs(5)-rt(5 source regs)-rd(5 des reg)-shamt(5 shift)-func(6)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: I-type: opcode(6)-rs(5)-rt(5)-immediate(16) J-type: opcode(6)-address(26) float: 1.f*2^e sign(1N/0P)-exp(8,excess-127)-fraction(23) double: sign(1N/0P)-exp(11,excess-1023)-fraction(52) Function: !! save $ra main: save except $s0-$s7 addi $sp, $sp, -4 sw $t1, 0($sp) jal function lw $t1, 0($sp) addi $sp, $sp, 4 restore function: # para:$a0-$a3 return: $v0-$v1 jr $ra Sheet1 Page 2 Register: $s0-$s7, $t0-$t9, $a0-$a3, $v0-$v1, $0, $sp, $ra, $at(temp reg) Macro: CPU time = Instructions executed * CPI(x,p) * Clock cycle time...
View Full Document

Page1 / 2

chi-chi_mid1 - I-type: opcode(6)-rs(5)-rt(5)-immediate(16)...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online