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()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ __attribute__() [1/2]

static __attribute__ ( (always_inline, const)  )
inlinestatic

Definition at line 14 of file byteswap.h.

15  {
16  __asm__ ( "xchgb %b0,%h0" : "=q" ( x ) : "0" ( x ) );
17  return x;
18 }
__asm__(".section \".rodata\", \"a\", " PROGBITS "\n\t" "\nprivate_key_data:\n\t" ".size private_key_data, ( . - private_key_data )\n\t" ".equ private_key_len, ( . - private_key_data )\n\t" ".previous\n\t")

References __asm__().

◆ __attribute__() [2/2]

static __attribute__ ( (always_inline)  )
inlinestatic

Definition at line 20 of file byteswap.h.

21  {
22  __asm__ ( "rorw $8, %0" : "+m" ( *x ) );
23 }
__asm__(".section \".rodata\", \"a\", " PROGBITS "\n\t" "\nprivate_key_data:\n\t" ".size private_key_data, ( . - private_key_data )\n\t" ".equ private_key_len, ( . - private_key_data )\n\t" ".previous\n\t")

References __asm__().