Page 8

movl %edx, (%rax)

//Store in p1->s.height

movq 16(%rbp), %rax leaq 4(%rax), %rdx

//Get p1 into register %rax //Compute address of p1->s.weight in register %rdx

movq 16(%rbp), %rax

//Get p1 into register %rax

movq %rdx, 8(%rax)

//Store in p1->hp

4. On the basis of this information, fill in the missing expressions in the code for str_init. void str_init(person *p1) { p1->s.height = _____________; p1->hp = _________________; } 5. How would you call str_init with the structperson1 passed to it?

GSP 215 Week 3 iLab Machine-Level Representation of Programs

FOR MORE CLASSES VISIT www.gsp215rank.com

Week 3 Lab Machine-Level Representation of Programs TCO 3—Given the need to understand and describe performance bottlenecks, acquire an understanding of how C and C++ is translated into machine code. Scenario

GSP 215 RANK Lessons in Excellence-- gsp215rank.com  
GSP 215 RANK Lessons in Excellence-- gsp215rank.com  
Advertisement