Question: Build Our Estimator You are going to write a small parser in C that counts the number of instructions and estimates how many cycles are

Build Our Estimator

You are going to write a small parser in C that counts the number of instructions and estimates how many cycles are needed to run that program from top to bottom.

As an example, if an assembly program had the following code:

# assembly.s program MOVQ a, %rax MOVQ b, %rbx ADDQ %rbx, %rax IMULQ %rbx MOVQ %rax, c 

Your tool will report a summary of the total Instructions (i.e. ADD, MOV, IMU, etc.) found and an estimate of the total cycles needed for hardware to execute this code:

ADD 1 MOV 3 IMUL 1 Total Instructions = 5 Total Cycles = 7

Build Our Estimator You are going to write a small parser in

You are going to write a small parser in C that counts the number of instructions and estimates how many cycles are needed to run that program from top to bottom. As an example, if an assembly program had the following code: \# assembly.s program MOVQ a,% \%ax MOVQ b,%rbx ADDQ \%rbx, \%rax IMULQ \%rbx MOVQ \%rax, c Your tool will report a summary of the total Instructions (i.e. ADD, MOV, IMU, etc.) found and an estimate of the total cycles needed for hardware to execute this code: ADD 1 MOV 3 IMUL 1 Total Instructions =5 Total Cycles =7

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!