Tool/software: TI C/C++ Compiler
Hi,
while debugging a problem with TI TMS470 5.1.6 compiler version we had to analyze the assembly code (target arc: mv7R4) as it was creating problems with the code when compiled with opt_level=2 and opt_level=3.
I observed that there is an assembly instruction when opt_level=2 is used which does not have any reference. I could not find any explanation of this instruction.(Note: the assembler code is generated by --keep_asm compiler directive)
It looks like this
;* --------------------------------------------------------------------------*
MOVW V7, var_name+-6 ; [DPU_4_PIPE0]
MOVT V7, var_name+-6 ; [DPU_4_PIPE0]
STRB A1, [V4, #296] ; [DPU_4_PIPE0] |407|
ADD V2, V4, #284 ; [DPU_4_PIPE1]
.....
Notice "+-6" ?? What does that mean? Is it a valid instruction?
The instruction is only present when the code is compiled with the opt_level=2 (with --keep_asm option) and we are observing that the application does not behave as it should. With the opt_level=3, the code behaves as expected that is why we started looking at the assembly. We must figure out what is going wrong at opt_level=2.
Another place in the code where a similar instruction occurs is like this:
MOVW A3, log_msg_len+0 ; [DPU_4_PIPE0] MOVS V1, A2, LSR #1 ; [DPU_4_PIPE1] MOVWNE V2, log_msg+-2 ; [DPU_4_PIPE0] MOVT A3, log_msg_len+0 ; [DPU_4_PIPE1] ..... MOV LR, #0 ; [DPU_4_PIPE0] |134| MOVTNE V2, log_msg+-2 ; [DPU_4_PIPE1]
Could you please explain what this instruction means?
Compared to opt_level=3, I did not see any such instruction.
BR,
Adnan