__cdp intrinsic

This intrinsic inserts a CDP or CDP2 instruction into the instruction stream generated by the compiler. It enables you to include coprocessor data operations in your C or C++ code.

Note

This intrinsic is intended for specialist expert use only.

Show/hideSyntax

__cdp(unsigned int coproc, unsigned int ops, unsigned int regs)

Where:

coproc

Identifies the coprocessor the instruction is for.

coproc must be an integer in the range 0 to 15.

ops

Is an encoding of two opcodes where:

  • the first opcode is a 4-bit coprocessor-specific opcode

  • the second opcode is an optional 3-bit coprocessor-specific opcode.

Add 0x100 to ops to generate a CDP2 instruction.

regs

Is an encoding of the coprocessor registers.

Show/hideUsage

The use of these instructions depends on the coprocessor. See your coprocessor documentation for more information.

Show/hideExample

void copro_example()
{
    const unsigned int ops = 0xA3; // opcode1 = A, opcode2 = 3 
    const unsigned int regs = 0xCDE; // reg1 = C, reg2 = D, reg3 = E
    __cdp(4,ops,regs); // coprocessor number 4
}

Show/hideSee also

Copyright © 2007-2008, 2011 ARM. All rights reserved.ARM DUI 0376C
Non-ConfidentialID061811