Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Is this a correct translation of what the IA 32 assembly language is portraying [in blue text after //] ? Sum.c contents: int add (int
Is this a correct translation of what the IA 32 assembly language is portraying [in blue text after //] ?
Sum.c contents:
int add (int x, int y) { int z; z = x + y; return z; } If this is in sum.c we can produce assembly code with: gcc -01 -s sum.c This generates the following: .file "sum.c" .text .globl add .type add, @function ada: pushi Sebp push long 32 bit operand value movl fesp, febp move long value 'ebp' to value 'esp' 12 ( ebp), feax // ebp stored at ebp+12 goes into eax addl 8( febp), feax }}ebp long value stored at [ ebp+8 ] adds eax long value popl febp || pop and return long value ebp movl ret return int add (int x, int y) { int z; z = x + y; return z; } If this is in sum.c we can produce assembly code with: gcc -01 -s sum.c This generates the following: .file "sum.c" .text .globl add .type add, @function ada: pushi Sebp push long 32 bit operand value movl fesp, febp move long value 'ebp' to value 'esp' 12 ( ebp), feax // ebp stored at ebp+12 goes into eax addl 8( febp), feax }}ebp long value stored at [ ebp+8 ] adds eax long value popl febp || pop and return long value ebp movl ret returnStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started