ARM > Introduction to ARM > Interworking
Previous topic:
Thumb
Next topic:
Thumb Example
RISC OS PrivateEye IntroductionToARM PhotoFiler Geminus Toolbar Site Containers GitHub Hardware iOS Optimisation Project Aha Retro Links Dump Spectrum Risc PC The Great Escape LEGO Wedding Acorn Doodle Blender 3D Isometric 2D Article Sinclair Ocean ARM TargetedOptimisation Disassembly Chase H.Q. Tip BasicOptimisation Trace Hard Disc Vector Pixel Art Groening Simpsons Futurama Disenchantment BBC Micro Electron Archimedes Slide EfficientC MotionMasks Script Python Iyonix QuickFiler Game
You can mix and match ARM and Thumb code within the same binary. This is called interworking and it lets you exploit the strengths of each instruction set.
For example:
The ‘T’ bit in the CPSR register signals Thumb mode.
BX Rm
.
ARMv5T and later architectures add:
BLX <Rm|label>