[fpc-devel] arm embedded cortexm3 procedure address

Jonas Maebe jonas.maebe at elis.ugent.be
Wed Jul 14 18:35:54 CEST 2010

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?


> 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.


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

More information about the fpc-devel mailing list