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.

Miscellaneous assembly labels in a program

Anonymous
Anonymous


Hi,

 

I would like to ask a question on various labels found in the disassembly of a program.

 

In addition to labels for main() as well as other functions I found in the disassembly code, there are still other labeled parts:

 

_memcpy:

c_int00:

C$RL0:

C$RL1:

C$L1, C$RL2:

_args_main:

C$L1, C$DW$L$_main$2$B:

C$DW$L$_main$2$E:

_nop:

C$$EXIT, abort:

 

What do these symbols/parts stand for? What are their respective roles in the code?

 

Another question is on the relationship between disassembly and original assembly file generated from C code by the compiler.

 

 

Are disassembly and original assembly exactly the same? If there are difference, what are?

 

 

 

 

Zheng

  • Most of those labels are strictly for compiler use.  They represent things such as destinations of branches and debugging information, and you should just ignore them.  c_int00 and _args_main are system startup functions.  They set up the execution environment before main starts.  _nop is a do-nothing function.  It is used internally to the RTS.

    The disassembled assembly code is not guaranteed to be the same as the input assembly code, and is not guaranteed to be valid input to the assembler.  The disassembler is a debugging aid.  Some information is lost during assembly, and there are more than one possible assembly code inputs that could result in the same object file.  For instance, some instructions are pseudo-ops (e.g. ZERO A0 could be SUB A0, A0, A0).  The disassembler picks a canonical representation.

  • Anonymous
    0 Anonymous in reply to Archaeologist

    Archaeologist,

    Could you have a look at Parallel bars "||" in Veloci assembly ? I found some inconsistencies between the actual execution order and the || syntax, and is it possibly due to the difference between disassembly and the original assembly?

     

     

    Zheng

  • Anonymous
    0 Anonymous in reply to Archaeologist

    Archaeologist,

     

     

    From page 508, SPRU732J, TMS320C64x-C64x+ DSP CPU and Instruction Set Reference Guide, the operands and destination should be register pairs for ZERO to be translated into SUB?

     

     

    Zheng

  • I was trying to explain what a "pseudo-op" is, and I simplified the description for clarity.  Most users should not be concerned with what instruction the assembler chooses to implement a particular pseudo-op.

  • Anonymous
    0 Anonymous in reply to Archaeologist

    Archaeologist,

    I see it, thanks.

     

    Zheng