Question: Suppose we want to generate assembly code for the following C function: long shift(unsigned x, unsigned y){ return (x>>4 & y < <2); } The
Suppose we want to generate assembly code for the following C function:
long shift(unsigned x, unsigned y){
return (x>>4 & y<<2);
}
The code below is a portion of the assembly code that performs the actual shifts and leaves the final value in register %rax. Two instructions have been omitted. Parameters x and y are stored in registers %rdi and %rsi respectively.
shift_right_left:
movl %edi, %eax
---------------------
movl %esi, %ecx
---------------------
---------------------
ret
Fill in the missing instructions where the dashed lines are.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
