1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Lyrx [107]
3 years ago
10

Computers spend most of their time in loops, so multiple loop itera- tions are great places to speculatively find more work to k

eep CPU resources busy. Nothing is ever easy, though: the compiler emitted only one copy of that loop's code, so even though multiple iterations are handling distinct data, they will appear to use the same registers. To keep multiple iterations' register usages from colliding, we rename their registers. Figure 3.49 shows example code that we would like our hardware to rename. A compiler could have simply unrolled the loop and used different registers to avoid conflicts, but if we expect our hard- ware to unroll the loop, it must also do the register renaming. How? Assume your hardware has a pool of temporary registers (call them T registers, and assume that there are 64 of them, TO through T63) that it can substitute for those registers des- ignated by the compiler. This rename hardware is indexed by the src (source) register designation, and the value in the table is the T register of the last destina- tion that targeted that register. (Think of these table values as producers, and the src registers are the consumers; it doesn't much matter where the producer puts its result as long as its consumers can find it.) Consider the code sequence in Fig ure 3.49. Every time you see a destination register in the code, substitute the next available T, beginning with T9. Then update all the src registers accordingly, so that true data dependences are maintained. Show the resulting code. (Hint: See Figure 3.50.)
Computers and Technology
1 answer:
fredd [130]3 years ago
7 0

Answer / Explanation:

From the provided Hint in Figure 3.50 and also The baseline performance ( in cycles, per loop iteration) of the code sequence in Figure 2.35 shows that  if no new instruction’s execution could be initiated until the previous instruction’s execution had completed, is 40.

Now, you might ask that how did I come up with that number?

Each instruction requires one clock cycle of execution (a clock cycle in which that instruction, and only that instruction, is occupying the execution units; since every instruction must execute, the loop will take at least that many clock cycles). To that base number, we add the extra latency cycles. Don’t forget the branch shadow cycle.

Therefore, the resulting code would be:

Loop:      LD F2,0(Rx) 1 + 4

               DIVD F8,F2,F01 + 12

               MULTD F2,F6,F2 1 + 5

               LDF4,0(Ry) 1 + 4

               ADDD F4,F0,F4 1 + 1

              ADDD F10,F8,F2 1 + 1

              ADDI Rx,Rx,#8 1

              ADDIRy,Ry,#81

              SDF4,0(Ry) 1 + 1

              SUB R20,R4,Rx 1

              BNZ R20,Loop 1 + 1

Cycle per loop iter 40

You might be interested in
Which type of error occurred in the following lines of code?
kvasek [131]

Answer: Logical Error

The division by 0 is a logical error.

8 0
3 years ago
There are many modes of remote visual communication. which is the most common mode
Veronika [31]
The answer is mobile communication, this consists of emails, texts, and parts of social media (Ex. DM's)
7 0
3 years ago
____ technology essentially takes the data to be transmitted and rather than transmitting it in a fixed bandwidth spreads it ove
aleksley [76]

Answer: Spread spectrum

Explanation:

In spread spectrum the data to be transmitted is spread over a wider bandwidth rather than fixed bandwidth.

4 0
3 years ago
How do I cancel and end my brainy subscription?
ella [17]

Answer:

Brainly Premium?

Explanation:

Go to your account, go to settings, and find the "cancel subscription" button in the *subscription* tab. Hope this helped!

7 0
2 years ago
Read 2 more answers
Allie is working on the development of a web browser and wants to make sure that the browser correctly implements the Hypertext
creativ13 [48]

Answer:

The answer is "Option c"

Explanation:

The W3C is the framework for the creation of software and the online standards through which sites and webpages work, and to turn into an authoritative source of information, she will work towards getting a reliable and credible source of knowledge from the "World Wide Web Consortium", and the wrong option can be described as follows:

  • In option a, It is wrong because this organization prepares and publishes all the electronic technologies.
  • In option b, It is wrong because it is the laboratory of physics, which is not useful in web development.
  • In option d, This technology is used in TCP/IP protocol, that's why it is incorrect.
3 0
3 years ago
Other questions:
  • Whats the Sioux City school wifi?
    15·2 answers
  • Harmful programs used to disrupt computer operation, gather sensitive information, or gain unauthorized access to computer syste
    7·1 answer
  • Why is outfitting a workspace with video games in technology development company considered a strategic use of money
    8·2 answers
  • You should always assign the Needs Met rating before assigning the Page Quality rating, T or F ?
    6·2 answers
  • What icon is usually used to indicate an attachment feature?
    14·2 answers
  • Brainliest for whoever adds me on snap<br> gianavaughn007
    15·2 answers
  • Which shortcut key combination will move the cursor to the beginning of the line?
    13·1 answer
  • Why is translator required?​
    11·2 answers
  • What is output by the following code?
    13·1 answer
  • Select the skill that matches the following definition.​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!