Hi,
I would like to ask a question on addressing modes in C6000.
I experimented with load/store address generation, and found a difference between ++/-- result with C-style:
For C, the increment/decrement is always unit, but is ucst5 for Load/Store assembly instructions. I initially find it strange, but then I thought it is perhaps because:
1. In C, ++/-- are most commonly used as loop counter, and the real increment/decrement depends on the context. It is also convenient to multiply the loop counter with another constant for other calculations. Therefore, unit increment is convenient and intuitive.
2. For assembly especially in Load/Store operations, since they are commonly used in conjunction with a loop to copy blocks of data, using ucst5 as increment/decrement avoid additional multiplication (time expensive) or addition, and is quite natural and convenient particularly for these instructions.
So is this the reason? Could anyone provide some comments on this?
Zheng