This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/TM4C1294NCPDT: How to read the assembly output files

Part Number: TM4C1294NCPDT

Tool/software: TI C/C++ Compiler

Hi

I'll try to find out whats the difference in some implementations of code - especially the run time.

And my question is what are the comments in the generated assembly files.

LDR       A3, [V3, #4]          ; [DPU_V7M3_PIPE] |368|

What means the number and why is it jumping around?

Could I see there how long an execution of the code needs out of that?

Kind regards

René

For example in this example out of my code

LDR       A3, [V3, #4]          ; [DPU_V7M3_PIPE] |368|
UBFX      A1, V1, #0, #14       ; [DPU_V7M3_PIPE] |99|
MOV       A2, A1                ; [DPU_V7M3_PIPE] |99|
MOV       V1, #4270             ; [DPU_V7M3_PIPE] |99|
ADD       A4, V3, A2, ASR #2    ; [DPU_V7M3_PIPE] |102|
STRH      A2, [V1, +V3]         ; [DPU_V7M3_PIPE] |99|
LDRSB     A4, [A4, #16]         ; [DPU_V7M3_PIPE] |102|
LDR       A3, [A3, #1156]       ; [DPU_V7M3_PIPE] |368|
SUBS      V2, V1, #2            ; [DPU_V7M3_PIPE]
ADDS      A2, A2, A4            ; [DPU_V7M3_PIPE] |102|
ADDS      A1, A1, A4            ; [DPU_V7M3_PIPE] |102|
SUBS      A2, A2, A3            ; [DPU_V7M3_PIPE] |102|
SUBS      A1, A1, A3            ; [DPU_V7M3_PIPE] |102|
ASRS      A2, A2, #13           ; [DPU_V7M3_PIPE] |102|
LSRS      A2, A2, #18           ; [DPU_V7M3_PIPE] |102|
ADDS      A3, A1, A2            ; [DPU_V7M3_PIPE] |102|
UXTH      A1, A1                ; [DPU_V7M3_PIPE] |102|
AND       A3, A3, #49152        ; [DPU_V7M3_PIPE] |102|
ADD       A1, A1, A1, LSL #16   ; [DPU_V7M3_PIPE] |102|
PKHBT     A2, A3, A2, LSL #16   ; [DPU_V7M3_PIPE] |102|
MOVS      A3, #0                ; [DPU_V7M3_PIPE] |115|
USAX      A1, A1, A2            ; [DPU_MERLIN_PIPE] |102|
MOVT      A3, #0                ; [DPU_V7M3_PIPE] |115|
STR       A3, [SP, #0]          ; [DPU_V7M3_PIPE] |115|
UXTH      A1, A1, ROR #16       ; [DPU_V7M3_PIPE] |102|
STRH      A1, [V2, +V3]         ; [DPU_V7M3_PIPE] |102|
MOVS      A1, #0                ; [DPU_V7M3_PIPE] |117|
MOVT      A1, #15540            ; [DPU_V7M3_PIPE] |117|
LDRH      A2, [V2, +V3]         ; [DPU_V7M3_PIPE] |117|
VMOV      S1, A1                ; [DPU_MERLIN_PIPE] |117|
ADD       A3, SP, #4            ; [DPU_V7M3_PIPE] |117|

  • Rene H. said:

    LDR       A3, [V3, #4]          ; [DPU_V7M3_PIPE] |368|

    What means the number

    A C source line is usually implemented with multiple assembly statements. This is the number of the C source line this assembly statement corresponds to.  Keep in mind this is not an officially documented detail of compiler generated assembly output.  It can change at any time without notice.

    Rene H. said:
    why is it jumping around?

    Due to optimization, the assembly statements are almost always in a different order than in the C source.

    Thanks and regards,

    -George