Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Hi can you help me answer the following questions on Performance Analysis & Instructor Set Architecture? Using the free c compiler from the GNU free
Hi can you help me answer the following questions on Performance Analysis & Instructor Set Architecture? Using the free c compiler from the GNU free compiler collection (GCC) project. Thank you!
CPHICxCPlxTc). If possible, create a main function to cal max1 and use the time command to measure the performance. Compare the measure to your estimatian. What do you think are the factors that cause the difference? Please provide your analysis. You may find references online regarding the CPl of each instruction.) Exercises 1. nstruction Analysis) This exercise will familir you with several ospects of instruction set and the fundamental of compiler. Given max.c (below), please use "gcc -S max.c" to compile the code into assembly code. (The result will be in max.s.) From the result answer the following questions int max1 (int a, int b) return (axb?a:b int max2 (int a, int b int isaGTb a>bi int max max-: max-b; return max: What does the code hint about the kind of instruction sef? (e.g. Accumulator, Register Memory Memory Memory, Register Register) Please justify your answer Can you tell whether the architecture is either Restricted Alignment or Unrestricted Alignment? Please explain how do you come up with yaur answer. Create a new function (e.g. testMax) to cal maxt. Generate new assembly code What does the result suggest regarding the register saving (caller save vs. callee save)? Please provide your analysis. How does the arguments be passed and the return value returned from a function? Please explain the code Find the part of code (snippet) that do compcrison and conditional branch. Explair how does it work If max.c is complied with optimization turned on (using "goc 02 -S max.c"), what are the differences that you may observe from the result (comparing to that without optimization). Please provide your analysis Please estimate the CPU Time required by the maxt function (using the equationStep 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