Data Dependencies in Processors P315 Lrmovl $50,(eax addl(eax 3 mrmovl 100((sebx)),edx a Result from one instruction used as operand for another e Read-after-write(RAW) dependency Very common in actual programs a Must make sure our pipeline handles these properly Get correct results o Minimize performance impact Processor
– 16 – Processor Data Dependencies in Processors ◼ Result from one instruction used as operand for another ⚫ Read-after-write (RAW) dependency ◼ Very common in actual programs ◼ Must make sure our pipeline handles these properly ⚫ Get correct results ⚫ Minimize performance impact 1 irmovl $50, %eax 2 addl %eax , %ebx 3 mrmovl 100( %ebx ), %edx P315
Control Dependence P316 Example: oop ●sub|%dx,%bx jne targ ● Irma$10,%dX ● jmp loop ■targ: ●hat a The jne instruction create a control dependency. o Which instruction will be executed? Processor
– 17 – Processor Control Dependence Example: ◼ loop: ⚫ subl %edx, %ebx ⚫ jne targ ⚫ irmovl $10, %edx ⚫ jmp loop ◼ targ: ⚫ halt ◼ The jne instruction create a control dependency. ⚫ Which instruction will be executed? P316