Low-level routines to support TML generated code.