Question: 1. (4 marks) A function with prototype int decode2(int x, int y, int z);- is compiled into IA32 assembly code. The body of the code

 1. (4 marks) A function with prototype int decode2(int x, int

1. (4 marks) A function with prototype int decode2(int x, int y, int z);- is compiled into IA32 assembly code. The body of the code is as follows: x at 96ebpt8, y at %ebp+12, z at %ebp+16+' w. 12(%ebp), %edx+' 2 subl 16(%ebp), 96Gdy 4 sall $31, %say 5 sarl$31, %say 8 Parameters x, y, and z are stored at memory locations with offsets 8, 12, and 16 relative to the address in register %ebp. The code stores the return value in register %eax. Write C code for decode2 that will have an effect equivalent to our assembly code

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!