Question: 2. You are given the following information. A function with prototype void decodel (int *xp, int *yp, int *zp) is compiled into assembly code shown

2. You are given the following information. A function with prototype void decodel (int *xp, int *yp, int *zp) is compiled into assembly code shown below (Note that function setup and finish codes are not shown). Write C code for decode1 that will have an effect equivalent to the assembly code below Note that parameters xp, yp, and zp are stored at memory locations with offset 8, 12, and 16, respectively, relative to the address in register ebp ebp+8, yp at ebp+ 12, %ebp+16 // assume that xp at movl 8(%ebp), %edi movl 12(%ebp), %edx movl 16(%ebp ) , %ecx movl (%edx), %ebx movl (%ecx), %esi movl (%edi), %eax movl %eax , (%edx ) movi %ebx, (%ecx ) movl %esi, (%edi ) zp at
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
