Question 10 Not yet answered Points out of 1.00 P Flag question Select the equivalent C function for the following assem
Posted: Sat May 14, 2022 4:49 pm
Question 10 Not yet answered Points out of 1.00 P Flag question Select the equivalent C function for the following assembler routine: foo2: pushl %ebp movl %esp,%ebp movl 8(%ebp),%eax # 8(%ebp) is testl %eax,%eax jge .L4 addl $15,%eax .L4: sarl $4,%eax movl %ebp,%esp popl %ebp ret
Select one: a. int choice1(int x) { return (x < 0); } b. int choice2(int x) { return (x « 31) & 1; } Oc int choice3(int x) { return 15 * x; } O d. int choice4(int x) { return (x + 15) /4 } Oe. int choice5(int x) { return x / 16; } Of int choice6(int x) { return (x >> 31); }
Select one: a. int choice1(int x) { return (x < 0); } b. int choice2(int x) { return (x « 31) & 1; } Oc int choice3(int x) { return 15 * x; } O d. int choice4(int x) { return (x + 15) /4 } Oe. int choice5(int x) { return x / 16; } Of int choice6(int x) { return (x >> 31); }