We can see that the compiler used a jump-to-middle translation, using the jmp instruction on line 3
Question:
We can see that the compiler used a jump-to-middle translation, using the jmp instruction on line 3 to jump to the test starting with label .L2. Fill in the missing parts of the C code.
Transcribed Image Text:
For C code having the general form short loop_while (short a, short b) { 1 2 3 4 5 6 7 8 short result = while ( } GCC, run with command-line option -Og, produces the following code: short loop_while (short a, short b) a in %rdi, b in %rsi loop_while: movl jmp 9 10 11 result = a = } return result; .L3: leaq addq subq .L2: ) { cmpq jg rep; ret $0, %eax .L2 ; (,%rsi,%rdi), %rdx %rdx, %rax $1, %rdi %rsi, %rdi .L3
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 60% (5 reviews)
This assembly code is a fairly straightforward ...View the full answer
Answered By
Akshay Singla
as a qualified engineering expert i am able to offer you my extensive knowledge with real solutions in regards to planning and practices in this field. i am able to assist you from the beginning of your projects, quizzes, exams, reports, etc. i provide detailed and accurate solutions.
i have solved many difficult problems and their results are extremely good and satisfactory.
i am an expert who can provide assistance in task of all topics from basic level to advance research level. i am working as a part time lecturer at university level in renowned institute. i usually design the coursework in my specified topics. i have an experience of more than 5 years in research.
i have been awarded with the state awards in doing research in the fields of science and technology.
recently i have built the prototype of a plane which is carefully made after analyzing all the laws and principles involved in flying and its function.
1. bachelor of technology in mechanical engineering from indian institute of technology (iit)
2. award of excellence in completing course in autocad, engineering drawing, report writing, etc
4.70+
48+ Reviews
56+ Question Solved
Related Book For
Computer Systems A Programmers Perspective
ISBN: 9781292101767
3rd Global Edition
Authors: Randal E. Bryant, David R. O'Hallaron
Question Posted:
Students also viewed these Computer science questions
-
Figure 3.21 C and assembly code for while version of factorial using guarded-do translation. The fact_while_gd_goto function illustrates the operation of the assembly-code version. We can see that...
-
List three specific parts of the Case Guide, Objectives and Strategy Section (See below) that you had the most difficulty understanding. Describe your current understanding of these parts. Provide...
-
Write a literature review for your study. See below for an example of a literature review. Your literature review should provide both analysis and synthesis of previous studies as related to the...
-
The following e-mail message contains numerous errors related to what you've learned about planning and writing business messages. Using the information it contains, write a more effective version....
-
The four approaches to accounting development discussed in the chapter were originally outlined in 1967. Do you think these patterns will persist in the future? Why or why not?
-
Assume that in Business Snapshot 27.1, the change in the three-month Euribor rate in each quarter, is normally distributed with mean zero and a standard deviation equal to x basis points. Use Monte...
-
Springfield, Ohio, is a small city.
-
Norton Corporation manufactures model airplanes. The company purchased for $190,000 automated production equipment that can make the model parts. The equipment has a $10,000 salvage value and a...
-
1. You are an employer who wants to reinstate an employee who left work with a back injury. However, it's a small workplace and the only job that the employee can perform is one created out of all...
-
Consider the 10 region sequences for the bacterial promoters in Figure 24.6. Why is the consensus sequence more active in promoting transcription than any of the sequences associated with actual...
-
A. Which registers are used to hold program values x, y, and n? B. How has the compiler eliminated the need for pointer variable p and the pointer dereferencing implied by the expression (*p)+=5? C....
-
AnnaLisa, an auditor for N. M. Neal & Associates, is prevented by the management of Lileah Company from auditing controls over inventory. Lileah is a public company. Management explains that controls...
-
Consider, again, the clothing data set. Obtain the three summary plots of the sample cross-correlations for lags 1 to 21.
-
Based on the dangling-else discussion in Exercise 3.27, modify the following code to produce the output shown. Use proper indentation techniques. You must not make any additional changes other than...
-
Consider the random process \(U(t)=A\), where \(A\) is a random variable uniformly distributed on \((-1,1)\). (a) Sketch some sample functions of this process. (b) Find the time autocorrelation...
-
In 2020 the global distribution of sales in the industrial gas industry was as follows: i What is Air Liquides position on a GCI/GRI mapping? Global industrial gas industry 82 billion The 2020 global...
-
The General Social Survey polled a sample of 1048 adults in the year 2010, asking them how many hours per week they spent on the Internet. The sample mean was 9.79 with a standard deviation of 13.41....
-
A ceiling fan has four blades, each with a mass of 0.35 kg and a length of 60 cm. Model each blade as a rod connected to the fan axle at one end. When the fan is turned on, it takes 4.35 s for the...
-
A copper wire (density = 8.96 g/cm 3 ) has a diameter of 0.25 mm. If a sample of this copper wire has a mass of 22 g, how long is the wire?
-
What is the bit rate for each of the following signals? a. A signal in which 1 bit lasts 0.001 s. b. A signal in which 1 bit lasts 2 ms. c. A signal in which 10 bits last 20 s.
-
What does the Nyquist theorem have to do with communications?
-
Which signal has a wider bandwidth, a sine wave with a frequency of 100 Hz or a sine wave with a frequency of 200 Hz?
-
6. Dee Hardy is a hotelier who operates 10 select-service hotels located near interstate highway exits in the Southeastern United States. She operates her properties under several franchise brands...
-
Lubricants, Inc., produces a special kind of grease that is widely used by race car drivers. The grease is produced in two processing departments-Refining and Blending. Raw materials are introduced...
-
UNIT 4 POST PROBLEM 2 Following are trial balances of Conglomerate and Sub Company as of December 31, YEAR 2. Sub $ 120,000 40,000 Cash Inventories Investment in S Building Equipment Accounts Payable...
Study smarter with the SolutionInn App