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
A0domain indicates that the computer or DNS name does not exist.
Alekssandra [29.7K]

Answer:

false

Explanation:

i believe the right term is error

7 0
3 years ago
Your organization has hired a penetration tester to validate the security of your environment. The penetration tester needs to d
yulyashka [42]

Answer:

Port scanner

Explanation:

The penetration tester would most likely use a port scanner. A port scanner can be explained to be an application that is made to check a server or host for ports that are open. This application can also be used by administrators to check their security networks so as to know those network services that are running on a host and also to know existing vulnerabilities. Attackers also use this to exploit victims.

5 0
3 years ago
if you want to present slide to fellow student or co-workers, wich productivity software should you use to create them?
Reika [66]
Microsoft PowerPoint
6 0
3 years ago
Adding videos to your website can be tricky because there may be problems making sure they will play in all
Volgvan
The sentence ends with the word 'devices'
4 0
3 years ago
Your manager comes up to you and says that you need to install a vpn server so that users can work while they are doing sales ca
Marina CMI [18]
I haven't seen your lesson, but I would:

- Not use PPTP, but rather OpenVPN or equivalent
- Consider using client certificates
- Consider using a token generator (a piece of hardware that generates access codes).
7 0
3 years ago
Other questions:
  • How many times is the function wordScramble() called in the given program? public class WordScramble { public static void wordSc
    6·1 answer
  • Candace opened an email from a person she didn't know and clicked on a pop-up in the email that installed a virus on her compute
    8·2 answers
  • Which computer port transmits audio and video without the need for compression?
    6·1 answer
  • Behaving in an acceptable manner in a workplace environment is referred to as workplace etiquette.
    12·2 answers
  • The ____ developed numerical methods for generating square roots, multiplication tables, and trigonometric tables used by early
    12·1 answer
  • One reason to buy a home instead of rent a home is:
    5·1 answer
  • Write the definition of a method, isReverse, whose two parameters are arrays of ints of equal size. The method returns true if a
    6·1 answer
  • PLEASE HELP ASAP
    13·2 answers
  • Examples of application software​
    7·2 answers
  • When creating an HTML document, what do we use to set aside space for content?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!