I've just discovered VTune (not discovered, it's just that I have some functions I'd like to optimize and I've seens it's really a useful tool, probably the best intel tool ever done ;) )
I have a cycle problem. I have this code:
vtune says r1 is not ready in the third instruction. I suppose it's cause due to the lsr #24 which needs an extra cycle.
But why it is not complaining about 4th instruction? I though r0 in the 3rd instruction should need 2 cycles to be ready due to the shift, but vtune says "Exec=1" (1 cycle to get results), while says "Exec=2".
is add r0,r0,r1,lsl #9 really giving the result to ldrh in 1 cycle (no stall), or it's ldrh which needs 2 cycles to fetch r0?
TIA
Kak
I have a cycle problem. I have this code:
- Code:
ADD r0,r0,r1
MOV r1,r6,lsr #24
ADD r0,r0,r1,lsl #9 ; r1 not ready!
ldrh r0,[r0]
vtune says r1 is not ready in the third instruction. I suppose it's cause due to the lsr #24 which needs an extra cycle.
But why it is not complaining about 4th instruction? I though r0 in the 3rd instruction should need 2 cycles to be ready due to the shift, but vtune says "Exec=1" (1 cycle to get results), while says "Exec=2".
is add r0,r0,r1,lsl #9 really giving the result to ldrh in 1 cycle (no stall), or it's ldrh which needs 2 cycles to fetch r0?
TIA
Kak