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: LSU EE 4720 Homework 1 Due: 29 September 2008 To answer the first question below see the MIPS32 Architecture manual linked to the course references page. Problem 1: The MIPS I bgtz and bltz instructions compare a register to zero, but can’t compare two registers (unless the second one is the zero register). Consider an extension of MIPS I that allowed branch greater than and branch less than instructions to compare two registers, call the new instructions bgt and blt . Explain why the existing bgtz opcode could be used for bgt but why the bltz opcode could not be used for blt . Hint: See bltzal . Problem 2: A C function and a part of a MIPS equivalent are shown below. The C function looks at the attributes of a car and decides what to pack in a promotional giveaway to the car buyer. The assembler code corresponds to the C function up until the last line (checking for a sun roof). #define FE_SPORTY 0x1 #define FE_OFF_ROAD 0x2 #define FE_EFFICIENT 0x4 #define FE_SUN_ROOF 0x10000 #define FE_MANUAL_TRANSMISSION 0x20000...
View Full Document
This note was uploaded on 08/01/2009 for the course EE 4720 taught by Professor Staff during the Spring '08 term at LSU.
- Spring '08