Keil Logo

Technical Support

On-Line Manuals

Compiler User Guide

Preface Overview of the Compiler Getting Started with the Compiler Compiler Features Compiler intrinsics Performance benefits of compiler intrinsics ARM assembler instruction intrinsics Generic intrinsics Compiler intrinsics for controlling IRQ and FIQ in Compiler intrinsics for inserting optimization bar Compiler intrinsics for inserting native instructi Compiler intrinsics for Digital Signal Processing Compiler support for European Telecommunications S Overflow and carry status flags for C and C++ code Texas Instruments (TI) C55x intrinsics for optimiz Compiler support for accessing registers using nam Pragmas recognized by the compiler Compiler and processor support for bit-banding Compiler type attribute, __attribute__((bitband)) --bitband compiler command-line option How the compiler handles bit-band objects placed o Compiler support for thread-local storage Compiler support for literal pools Compiler eight-byte alignment features Precompiled Header (PCH) files Automatic Precompiled Header (PCH) file processing Precompiled Header (PCH) file processing and the h Precompiled Header (PCH) file creation requirement Compilation with multiple Precompiled Header (PCH) Obsolete Precompiled Header (PCH) files Manually specifying the filename and location of a Selectively applying Precompiled Header (PCH) file Suppressing Precompiled Header (PCH) file processi Message output during Precompiled Header (PCH) pro Performance issues with Precompiled Header (PCH) f Default compiler options that are affected by opti Compiler Coding Practices Compiler Diagnostic Messages Using the Inline and Embedded Assemblers of the AR Compiler Command-line Options Language Extensions Compiler-specific Features C and C++ Implementation Details What is Semihosting? Via File Syntax Summary Table of GNU Language Extensions Standard C Implementation Definition Standard C++ Implementation Definition C and C++ Compiler Implementation Limits

Compiler support for European Telecommunications Standards Institute (ETSI) basic operations

3.9 Compiler support for European Telecommunications Standards Institute (ETSI) basic operations

ARM Compiler 4.1 and later provide support for the ETSI basic operations to help implement coding of speech.

ETSI has produced several recommendations for the coding of speech, for example, the G.723.1 and G.729 recommendations. These recommendations include source code and test sequences for reference implementations of the codecs.
Model implementations of speech codecs supplied by ETSI are based on a collection of C functions known as the ETSI basic operations. The ETSI basic operations include 16-bit, 32-bit and 40-bit operations for saturated arithmetic, 16-bit and 32-bit logical operations, and 16-bit and 32-bit operations for data type conversion.

Note

Version 2.0 of the ETSI collection of basic operations, as described in the ITU-T Software Tool Library 2005 User's manual, introduces new 16-bit, 32-bit and 40 bit-operations. These operations are not supported in the ARM compilation tools.
The ETSI basic operations serve as a set of primitives for developers publishing codec algorithms, rather than as a library for use by developers implementing codecs in C or C++.
ARM Compiler 4.1 and later provide support for the ETSI basic operations through the header file dspfns.h. The dspfns.h header file contains definitions of the ETSI basic operations as a combination of C code and intrinsics.
See dspfns.h for a complete list of the ETSI basic operations supported in ARM Compiler 4.1 and later.
ARM Compiler 4.1 and later support the original ETSI family of basic operations as described in the ETSI G.729 recommendation Coding of speech at 8 kbit/s using conjugate-structure algebraic-code-excited linear prediction (CS-ACELP), including:
  • 16-bit and 32-bit saturated arithmetic operations, such as add and sub. For example, add(v1, v2) adds two 16-bit numbers v1 and v2 together, with overflow control and saturation, returning a 16-bit result.
  • 16-bit and 32-bit multiplication operations, such as mult and L_mult. For example, mult(v1, v2) multiplies two 16-bit numbers v1 and v2 together, returning a scaled 16-bit result.
  • 16-bit arithmetic shift operations, such as shl and shr. For example, the saturating left shift operation shl(v1, v2) arithmetically shifts the 16-bit input v1 left v2 positions. A negative shift count shifts v1 right v2 positions.
  • 16-bit data conversion operations, such as extract_l, extract_h, and round. For example, round(L_v1) rounds the lower 16 bits of the 32-bit input L_v1 into the most significant 16 bits with saturation.

    Note

    Beware that both the dspfns.h header file and the ISO C99 header file math.h both define (different versions of) the function round(). Take care to avoid this potential conflict.
Non-ConfidentialPDF file icon PDF versionARM DUI0375H
Copyright © 2007, 2008, 2011, 2012, 2014-2016 ARM. All rights reserved. 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.