Partager via


__emit (Windows Embedded CE 6.0)

1/5/2010

This intrinsic function inserts a specified instruction into the stream of instructions output by the compiler.

Syntax

void __emit(
   const unsigned __int32 opcode
);

Parameters

  • opcode
    Instruction word to be inserted.

Return Values

None

Remarks

The value of opcode must be a constant expression known at compile time.

The compiler makes no attempt to interpret the contents of opcode and does not guarantee a CPU or memory state before the inserted instruction is executed.

The compiler assumes that the CPU and memory states are unchanged after the inserted instruction is executed. Therefore, instructions that do change state can have a detrimental impact on normal code generated by the compiler.

For this reason, use __emit only to insert instructions that affect a CPU state that the compiler does not normally process, such as coprocessor state, or to implement functions declared with __declspec(naked).

When generating ARM instructions, the size of an instruction word is 32 bits. When generating Thumb instructions, as when /QRthumb is specified, the size of an instruction word is 16 bits and the most significant 16 bits of opcode are ignored.

Requirements

Architecture ARM
Header armintr.h
Routine __emit

See Also

Reference

ARM10 Intrinsic Functions
/QRthumb