Question: Assuming the following function prototype: // int fun( int x ) // x in %edi Which assembly instructions represent the following line of C code?

Assuming the following function prototype:

// int fun( int x ) // x in %edi 

Which assembly instructions represent the following line of C code?

 return ( x / 16 ) * 16; 

Question 3 options:

 movl %edi,%eax shrl $0x10,%eax imull $0x10,%eax 
 movl %edi,%eax sarl $0x10,%eax imull $0x10,%eax 
 movl %edi,%eax shrl $0x16,%eax imull $0x16,%eax 
 movl %edi,%eax sarl $0x16,%eax imull $0x16,%eax 

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!