{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

ICS233_Lecture8 Slides

# ICS233_Lecture8 Slides - Computer Architecture Assembly...

This preview shows pages 1–4. Sign up to view the full content.

1 Lecture Slides on Computer Architecture ICS 233 @ Dr A R Naseer 1 MIPS MIPS PROCESSOR PROCESSOR INSTRUCTION SET INSTRUCTION SET ICS 233 ICS 233 Computer Architecture & Computer Architecture & Assembly Language Assembly Language Lecture Slides on Computer Architecture ICS 233 @ Dr A R Naseer 2 ICS 233 ICS 233 Computer Architecture & Computer Architecture & Assembly Language Assembly Language Lecture 8 Lecture 8

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

View Full Document
2 Lecture Slides on Computer Architecture ICS 233 @ Dr A R Naseer 3 Lecture Outline MIPS Compare or Set Less than instructions MIPS Conditional Branch Instructions MIPS Instruction J-Type Format MIPS Unconditional Jump Instructions Lecture Slides on Computer Architecture ICS 233 @ Dr A R Naseer 4 Compare : Set on Less Than Instructions MIPS also provides set on less than instructions slt rd,rs,rt if (rs < rt) rd = 1 else rd = 0 sltu rd,rs,rt unsigned < slti rt,rs,im 16 if (rs < im 16 ) rt = 1 else rt = 0 sltiu rt,rs,im 16 unsigned < Signed / Unsigned Comparisons can produce different results Assume \$s0 = 1 and \$s1 = -1 = 0xffffffff slt \$t0,\$s0,\$s1 results in \$t0 = 0 stlu \$t0,\$s0,\$s1 results in \$t0 = 1