EE 3755 Final: EE 3755 LSU 2013fFinal Exam

66 views15 pages
31 Jan 2019
School
Course
Professor

Document Summary

Problem 6 (16 pts) (16 pts) (16 pts) (16 pts) (20 pts) (16 pts) Problem 1: [16 pts] write mips code corresponding to the following fragments of c code. C variables have the same name as the mips registers to which they were assigned. That is, in the rst example, the c variable r2 has been assigned to mips register r2. The c compiler used for the code below uses 4-byte ints, 2-byte shorts, and 4-byte pointers. E cient mips code for corresponding c: int r1, r2, r3; r1 = r2 + r3 - 4; E cient mips code for corresponding c: int r1, r2, r3; r1 = r2 & 0xabcdef01; r3 = r2 && r1; E cient mips code for corresponding c: int r1, r2; r1 = r2 > 21; E cient mips code for corresponding c: int r1, r3; int* r2; // sizeof(int) = 4 r1 = r2[r3] + r2[r3+10]; r2[0] = r1;

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers