Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Look at the assembly instructions below. These instructions will be pipelined to

ID: 3817501 • Letter: L

Question

Look at the assembly instructions below. These instructions will be pipelined to speed up the code execution. Unfortunately the code cannot be pipelined as is due to data dependencies. Add 'NOP' instruction in the code below at the appropriate locations to ensure that pipelining can be accomplished. (blank means do not add a 'NOP', 1NOP means add one line of 'NOP', 2NOP means add two lines of 'NOP', 3NOP means a three lines of 'NOP') mov $10, %eax add $12, %eax mov $4, $ebx mov $5, %ecx add $1, %ecx add %ecx, %eax add %ebx, %eax

Explanation / Answer

mov

0 NOP

add

1 NOP

Mov

0 NOP

mov

1 NOP

add

1 NOP

add

2 NOP

add

2 NOP

add

2 NOP

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote