Part Number: TMS320F28377D
Hello experts,
I am currently investigating the assembly language translation of the CLA C compiler and I don't understand something:
| In the following C code | switch(uwA1) { case(4): uwB1++; uwA1 = 0; break; } |
| starts the assembler conversion with the following code: | 00008b64: 7580994C MMOVZ16 MR0, @0x994c 00008b66: 78410000 MMOVIZ MR1, #0x0 00008b68: 7BC0003C MLSL32 MR0, 16 00008b6a: 78810004 MMOVXI MR1, #0x4 00008b6c: 7B80003C MLSR32 MR0, 16 00008b6e: 7F200001 MCMP32 MR1, MR0 |
1.) The 16Bit -UINT-variable "uwA1" is loaded with "MMOVZ16" into "MR0".
What are the following shift operations "MLSL32" and "MLSR32" for?
According to TRM the "MRa" register is loaded with "MMOVZ16" as follows:
MRa(31:16) = 0;
MRa(15:0) = [mem16];
So the shift operations seem unnecessary to me.
What am I missing?
2.) The comparison value "4" is loaded into "MR1". But before that "MR1" is reset to "0".
Why is this necessary?
Thanks in advance,
Jan
