6.3. Using the Thumb Procedure Call Standard

The Thumb Procedure Call Standard (TPCS) is a set of rules that govern inter-calling between functions written in Thumb code. The TPCS is essentially a cut-down APCS.

There are fewer options with TPCS than with the APCS. This reflects the different ways in which ARM and Thumb code are used, and also reflects the reduced nature of the Thumb instruction set.

Specifically, the TPCS does not support:

disjoint stack extension (stack chunks)

Under the TPCS, the stack must be contiguous. However, this does not prohibit the use of multiple stacks to implement co-routines, for example.


Reentrant code is code that calls the same entry point with different sets of static data.

You can implement reentrancy by placing in a struct all variables that must be multiply instantiated, and passing each function a pointer to the struct.

hardware floating-point

Thumb code cannot access floating-point instructions without switching to ARM state. Floating-point is supported indirectly by defining how FP values are passed to and returned from Thumb functions in the Thumb registers.

Refer to the ARM Software Development Toolkit Reference Guide for the full specification of the TPCS.

Copyright © 1997, 1998 ARM Limited. All rights reserved.ARM DUI 0040D