Consider the following C functions and assembly code: int fun7 (int a) pushl rbp movi rap, Srbp movi 8(rbp),teax sall $4,teax addi B(rbp), Seax addl seax, Seax movi rbp, trap popl krbp return a 30;...


Consider the following C functions and assembly code:<br>int fun7 (int a)<br>pushl rbp<br>movi rap, Srbp<br>movi 8(rbp),teax<br>sall $4,teax<br>addi B(rbp), Seax<br>addl seax, Seax<br>movi rbp, trap<br>popl krbp<br>return a 30;<br>int fun8 (int a)<br>ret<br>return a<br>- 34;<br>int fun9 (int a)<br>return a<br>(note: you will need to infer where the value of parametera is located<br>on the stack from the context)<br>Which of the functions compiled into the assembly code shown?<br>Give a brief explanation<br>

Extracted text: Consider the following C functions and assembly code: int fun7 (int a) pushl rbp movi rap, Srbp movi 8(rbp),teax sall $4,teax addi B(rbp), Seax addl seax, Seax movi rbp, trap popl krbp return a 30; int fun8 (int a) ret return a - 34; int fun9 (int a) return a (note: you will need to infer where the value of parametera is located on the stack from the context) Which of the functions compiled into the assembly code shown? Give a brief explanation

Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here