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: 50% (4 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?
-
Explain what arbitrageurs would do if the price of an American S\&P 500 futures put with an exercise price of 2,200 were priced at 45 when the underlying futures price was trading at 2,150 . What...
-
Verify that the following equation exhibits chaotic behavior: \[x_{n+1}=k x_{n}\left(1-x_{n} ight)\]
-
Data for Herron Corporation are shown below: Fixed expenses are $75,000 per month and the company is selling 3,000 units per month. Required: 1. The marketing manager argues that an $8,000 increase...
-
Total Amount Units Sales Variable Costs: 31,250 Per Unit $ 445,313 $ 14.25 Direct Materials $ 125,000 4.00 = Direct Labor $ 28,000 0.90 = Variable Manufacturing Overhead $ 66,250 2.12 = Sales...
-
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....
-
Find the radius of convergence and interval of convergence of the series. 00 (-1)"x" n=0 n + 1
-
Which is more important, strategic or tactical decision making?
-
Ethics are principles that define what?
-
Find the percentile that corresponds to an age of 57 years old. Use the data set, which represents the ages of 30 executives. 43 57 65 47 57 41 56 53 61 54 56 50 66 56 50 61 47 40 50 43 54 41 48 45...
-
Does a service operation usually experience higher or lower variability in its inputs and outputs, when compared to goods production?
-
In the hierarchy of decision making, what level is below strategic decision making?
-
On January 4, 20X7, Pradeesh Corp. acquired 100% of the outstanding common shares of Serena Inc. by a share- for- share exchange of its own shares valued at $ 1,000,000. The statements of financial...
-
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?
-
In the previous problem, we prove that the transformation between the body and spatial twists preserve the screw motion. When we say the twist represents the velocity of the rigid motion in SE(3), it...
-
Suggested time 2 1 minutes Baker Limited manufactures cameras used in professional hockey leagues on the ice including in the back of the net to get a glimpse of those flying pucks. Baker Limited...
-
Figure x Part C Check all the possible support reactions on the rod, even if some of them are equal to zero due to the loading given. Make sure the reactions in the set you choose do not depend on...
Study smarter with the SolutionInn App