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

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!