This preview shows page 1. Sign up to view the full content.
Unformatted text preview: 2, 25 if ( $s1 == $s2) go to
PC + 4 + 100 Equal test; PC-relative branch branch on not equal bne $s1, $s2, 25 if ( $s1 != $s2) go to
PC + 4 + 100 Not equal test; PC-relative set on less than slt $s1, $s2, $s3 if ( $s2 < $s3) $ s1 = 1;
else $ s1 = 0 Compare less than; for beq, bne set less than
immediate Arithmetic Instruction slti jump
jump and link j
jal add immediate
load w ord
store w ord
Data transfer load byte
branch on equal Conditional
branch Unconditional jump Spring 2013, Jan 25 . . .
Spring $s1, $s2, 100 if ($s2 < 100) $ s1 = 1; Comments Compare less than constant else $ s1 = 0 2500
2500 go to 10000
Jump to target address
For sw itch, procedure return
$ra = PC + 4; go to 10000 For procedure call ELEC 5200-001/6200-001 Lecture 3 43 Addressing Modes Example 1. Immedi at e addressi ng addi
add op rs rt Im mediate 2. Register addr essing
op rs rt rd ... funct Reg isters
Register 3. Base addr essing lw, sw op rs rt + Regist er beq, bne Me mo r y Addr ess Byte Halfw or d Word 4. PC-relati ve addressing
op rs rt Me mo r y Addr ess + PC Word 5. Pse udodir ect addr essing j op Add ress Me mo r y Word PC 2004 © Morgan Kaufman Publishers Spring 2013, Jan 25 . . .
Spring ELEC 5200-001/6200-001 Lecture 3 44 Alternative Architectures
– provide more powerful operations
– goal is to reduce number of instructions executed
– danger is a slower cycle time and/or a higher CPI
–“The path toward operation complexity is thus fraught with peril.
To avoid these problems, designers have moved toward simpler
instructions” Let’s look (briefly) at IA-32
2004 © Morgan Kaufman Publishers Spring 2013, Jan 25 . . .
Spring ELEC 5200-001/6200-001 Lecture 3 45 1978:
1982: IA–32 (a.k.a. x86) The Intel 8086 is announced (16 bit architecture)
The 8087 floating point coprocessor is added
The 80286 increases address space to 24 bits,
The 80386 extends to 32 bits, new addressing modes
1989-1995: The 80486, Pentium, Pentium Pro add a few instructions
(mostly designed for higher performance)
57 new “MMX” instructions are added, Pentium II
The Pentium III added another 70 instructions (SSE –
streaming SIMD extensions)
Another 144 instructions (SSE2)
AMD extends the architecture to increase address space to
64 bits, widens all registers to 64 bits and makes other
View Full Document
This document was uploaded on 01/17/2014.
- Spring '14