| |||
| Home > Interworking ARM and Thumb > Assembly language interworking | |||
In an assembly language source file, you can have several areas. These correspond to ELF sections. Each area can contain ARM instructions, Thumb instructions, or both.
You can use the linker to fix up calls to, and returns from,
routines that use a different instruction set from the caller. To
do this, use BL to call the routine, see Assembly language interworking using
veneers.
If you prefer, you can write your code to make the instruction set changes explicitly. In some circumstances you can write smaller or faster code by doing this.
The following instructions perform the processor state changes:
BLX, LDR, LDM,
and POP, see Interworking with ARM architecture
v5T and later.
The ARM and THUMB directives instruct
the assembler to assemble instructions from the appropriate instruction
set, see Changing the assembler mode.