Re: ARM assembler: labels
- From: mojaveg@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx (Everett M. Greene)
- Date: Tue, 26 Aug 2008 11:21:22 PST
"Roman Mashak" <mrv@xxxxxxxx> writes:
Hello, Paul!
You wrote on Mon, 25 Aug 2008 11:42:18 +0300:
PK> Typically label1 and label2 would be descriptive names.
PK> Look at the code where you have the branch/jump instruction to
PK> label1/label2 and there are typically different reasons to going to
PK> either label1 or label2.
This is snippet from the "AT91sam7s getting started" startup code by Atmel:
[skip includes and defines]
/* Application startup entry point */
..globl reset_handler
..align 4
..section .vectors
..arm
/* Exception vectors (should be a branch to be detected as a valid code by
the rom */
_exception_vectors:
reset_vector:
ldr pc, =reset_handler
undef_vector:
b undef_vector /* Undefined Instruction */
......
'_exception_vectors' is not referred anywhere else in the code. I was asking
about such situations. Perhaps Atmel guys writing this code just forgot to
erase old label or they might have left it deliberately for some reason.
No harm, no foul as they say in the NBA. Disassembled code
produced by compilers quite regularly include numerous
labels that are never referenced. It is quicker and
easier to include unreferenced labels than to spend a
lot of logic deciding which ones are active and which
ones aren't. One compiler with which I regularly work
inserts a line for every source line, including null
statements.
PK> For instance, if instruction1/2 are part of a common error handler, it.
PK> is practical to list the name of each error contrition with different
PK> label names, although the error handler code is common.
- References:
- Re: ARM assembler: labels
- From: Roman Mashak
- Re: ARM assembler: labels
- Prev by Date: Re: Orcad is a total piece of dog crap!
- Next by Date: Re: Orcad is a total piece of dog crap!
- Previous by thread: Re: ARM assembler: labels
- Next by thread: Re: i need help
- Index(es):
Relevant Pages
|