(the first) difference form MW4.0 to 5.0

Started by Matteo_Cardin May 15, 2002
Hi all,
this post to documentate the first (and I hope the last) great
(almost for me) difference from version 4.0 to 5.0 of Metrowerks
When I want to set or read a DSP register in version 4.0 I write
simply, for example:


and the compiler use in the first case only one instruction
(immediate addressing without use any register) and in the second
case read the value of the register put it in X0 register and then
put the contents of the X0 inside the memory location of "short_var".

In version 5.0 the same instructions are coded in a different mode:
no more immediate addressing but only indirect; so the first line is
coded in this mode:
1) put the address of the register in R0
2) put the value to write into in X0
3) make a move instruction with indirect addressing

A simply question: why of this difference?
Matteo Cardin