Geoffrey Barton wrote on Wed, 14 Jul 2010:

the resulting constant disassembles as:-

1bc:    000001a5        .word   0x000001a5

which seems to be one greater than the address of the procedure.
Is this right?

Yes.

If so, why?

To identify the code as Thumb code.

also, why does the compiler sometimes add a 'nop' to the end of a procedure (as above)?

The default alignment of routines is 4 bytes. And it's most likely the assembler or linker that adds the nop, rather than the compiler.


Jonas

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to