Create an ARMv8 A64 assembly language program that finds the maximum of y=-2x - 22x +...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Create an ARMv8 A64 assembly language program that finds the maximum of y=-2x³ - 22x² + 11x + 57 in the range -10 ≤x≤4, by stepping through the range one by one in a loop and testing. Use only long integers for x, and do not factor the expression. Use the printf() function to display to the screen the values of x, y and the current maximum on each iteration of your loop. You are to create 2 versions of your program: 1. Write the program without macros (i.e. don't use m4), and use only the mul, add, and mov instructions to do your calculations. Use a pre-test loop, where the test is at the top of the loop. 2. Optimize the above program by putting the loop test at the bottom of the loop (make sure it is still a pre-test loop), and by making use of the madd instruction. Also, add macros to the above program to make it more readable (use m4). In particular, provide macros for heavily used registers. Create an ARMv8 A64 assembly language program that finds the maximum of y=-2x³ - 22x² + 11x + 57 in the range -10 ≤x≤4, by stepping through the range one by one in a loop and testing. Use only long integers for x, and do not factor the expression. Use the printf() function to display to the screen the values of x, y and the current maximum on each iteration of your loop. You are to create 2 versions of your program: 1. Write the program without macros (i.e. don't use m4), and use only the mul, add, and mov instructions to do your calculations. Use a pre-test loop, where the test is at the top of the loop. 2. Optimize the above program by putting the loop test at the bottom of the loop (make sure it is still a pre-test loop), and by making use of the madd instruction. Also, add macros to the above program to make it more readable (use m4). In particular, provide macros for heavily used registers.
Expert Answer:
Answer rating: 100% (QA)
Below are the two versions of the ARMv8 A64 assembly language program as per your requirements Version 1 Without Macros Pretest Loop Using mul add mov ... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
X-5 Given that g(x)= -, find each of the following. X+4 a) g(9) b) g(5) c) g(-4 Question Viewer d) g(- 14.25)
-
How do cultural narratives and myths shape collective memory and influence societal values, norms, and behaviors ? Explain
-
magine Sun, a physicist grad student, has the choice to spend the weekend working on their experiment or participating in a dance festival. According to Aristotle's virtue ethics, which choice should...
-
Explain how an antibody is able to recognize a specific antigen. (Include an explanation of an epitope in your answer.)
-
The accounting system should provide information for five broad purposes. Describe them.
-
Let us assume that Company X is a manufacturing company and it has both service and production departments as shown in the table below SERVICE DEPARTMENTS PRODUCTION DEPARTMENTS R&M Warehouse R&M...
-
A cash receipts journal is provided in the Working Papers. Work independently to complete the following problem. David Rice and Tanya Taylor agree to form a partnership on July 1 of the current year....
-
Durban Metal Products, Ltd., of the Republic of South Africa makes specialty metal parts used in applications ranging from the cutting edges of bulldozer blades to replacement parts for Land Rovers....
-
Evaluate the expression sin -1 (cos (7+)).
-
Stitch Fix, a San Francisco-based company, applies data capabilities to make online retailing more like a personal shopping assistant. CEO Katrina Lake created Stitch Fix as a retailer grounded in...
-
A fish is able to jump vertically out of the water with a speed of 4 . 4 m / s . How much time in seconds does it take for the fish to pass a point 0 . 5 m above the water on the way down?
-
Suppose you use Winter's forecasting method on historical data from Q1 2010 to Q4 2018. You obtain the following data for time t = quarter 4 2018: L_t= 1065 T_t = 15 S_t = 0.95 S_{t-1} = 0.9 S_{t-2}...
-
You enter an antique classic car road rally with your 1956 Studebaker Golden Hawk. The rally course consists of the following segments: travel north at 27.0 m/s for 30.0 min, then east at 39.0 m/s...
-
The US Dollar's reserve currency status confers many advantages. How did it aid the US in responding to the Russian invasion of Ukraine? What are some of the consequences of these actions and do they...
-
1. Reacting to protests against the high prices of wheat, the government enacted a law which limits the price of wheat. Assume that this is a closed (i.e., non-trading) economy and that the wheat...
-
Pick an industry in the Resilinc 2018 Annual report. Describe uncertainties in the industry and possible risk mitigation. Search the internet for one or two examples of that industry and how they...
-
What is the output of the following code segment? int c = 6, d = 12; if(c 8) Console.Write("Green"); else else Console.Write("Yellow"); Console.Write("Blue");
-
Vectors are drawn from the center of a regular n-sided polygon in the plane to the vertices of the polygon. Show that the sum of the vectors is zero.
-
Repeat Programming Exercise 3 with Python. Data from Exercise 3: Write a JavaScript script that has subprograms nested three deep and in which each nested subprogram references variables defined in...
-
Examine the subprogram call instructions of three different architectures, including at least one CISC machine and one RISC machine, and write a short comparison of their capabilities. (The design of...
-
The designers of Java obviously thought it was not worth the additional efficiency of allowing any method to be statically bound, as is the case with C++. What are the arguments for and against the...
-
A \(60 \mathrm{vol} \%\) tributyl phosphate (TBP) in kerosene solvent extracts \(\mathrm{Zr}\left(\mathrm{NO}_{3} ight)_{4}\) from an aqueous solution. Entering solvent is recycled from a solvent...
-
Many extraction systems are partially miscible at high concentrations of solute but close to immiscible at low solute concentrations. At relatively low solute concentrations both McCabe-Thiele and...
-
The aqueous two-phase system in Example 13-3 will be used in a batch extraction. \(7.5 \mathrm{~kg}\) of PEG solution contains protein at mass fraction \(\mathrm{x}_{\mathrm{F}}\). Use \(6.0...
Study smarter with the SolutionInn App