28.2.59 __builtin_swap

Description

For a 16-bit word, swap the bytes in the word; 0x1234 -> 0x3412.

Prototype

uint16_t __builtin_swap(uint16_t word);

Argument

word – 16-bit word

Return Value

Returns the swapped value.

Assembler Operator/ Machine Instruction

swap

Error Messages

None.