iPXE
Functions
byteswap.h File Reference

Byte-order swapping functions. More...

#include <stdint.h>

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
static __attribute__ ((always_inline, const )) uint16_t __bswap_variable_16(uint16_t x)
static __attribute__ ((always_inline)) void __bswap_16s(uint16_t *x)

Detailed Description

Byte-order swapping functions.

Definition in file byteswap.h.


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )
static __attribute__ ( (always_inline, const )  ) [inline, static]

Definition at line 14 of file byteswap.h.

References __asm__().

                                   {
        __asm__ ( "xchgb %b0,%h0" : "=q" ( x ) : "0" ( x ) );
        return x;
}
static __attribute__ ( (always_inline)  ) [inline, static]

Definition at line 20 of file byteswap.h.

References __asm__().

                            {
        __asm__ ( "rorw $8, %0" : "+m" ( *x ) );
}