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?
-
For a marketing class term project, Bob is investigating whether college seniors eat less frequently in fast-food chains than college freshmen. He asked 11 freshmen and 11 seniors to keep track of...
-
Compare and contrast structures and decision-making powers of the Federal Reserve, the European System of Central Banks and the Bank of England.
-
Mirk Labs is a British pharmaceutical company that currently enjoys a patent monopoly in Europe, Canada, and the United States on Zatab (pronounced zay-tab), an allergy medication. The global demand...
-
a. The Marketing Department has estimated sales as follows for the remainder of the year (in units): July August September 41,000 October 92,000 31,000 November 17,500 61,000 December 18,000 The...
-
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....
-
Consider the following data. a. Construct a dot plot. b. Construct a frequency distribution. c. Construct a percent frequency distribution. 8.9 10.2 5 7.8 10.0 12.2 13.5 4 0.0 12.2 6.8 9.5 115 11.2...
-
Consider the problem of evaluating the integrals Yn = dx x+10 for n = 1, 2,... Analytically we notice that Also, 1 Yn + 10yn-1 = L x+10x-1 x+10 1 dx = xn-1 dx n Yo = S 1 1 dx = ln(11) - In(10). x+10...
-
Find equations of the following. y= ln(x+), (0, 0, 1) (a) the tangent plane
-
On January 1, 2022 Bruce Lee started a small business buying and selling hand sanitizers. He invested $40,000 in the business and during the next six months, the following transactions occurred. Date...
-
LG Refrigerators in Egypt Analyze brand's Marketing Mix in your own country. Identify brand's Target Group in your own country. Suggest Marketing Objectives and Marketing Strategies to reach those...
-
ExplaintheroleofProcessControlBlock.DemonstratethechangeofinformationinPCB(Process control block) of one process from initialization to completion
-
Commuting Times Mark Bates, a statistics professor at Oxnard College, recorded his commuting times using three different routes from home to work. The routes are named for the streets on which he...
-
For the following exercises, write the first four terms of the sequence. a n = 2 n 2
-
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?
-
what is the hypothesis formulation for fintech mobile banking influence on businesses and customers
-
Novak Inc. wants to replace its current equipment with new high - tech equipment. The existing equipment was purchased 5 years ago at a cost of $ 1 2 9 , 0 0 0 . At that time, the equipment had an...
-
A bond has a coupon of 12 percent, and is currently selling for $800, had an original maturity of 15 years is due to mature in 12 years. The return on the bond, viz. its yield to maturity (YTM) is:...
Study smarter with the SolutionInn App