Home | History | Annotate | Download | only in asm
      1 /****************************************************************************
      2  ****************************************************************************
      3  ***
      4  ***   This header was automatically generated from a Linux kernel header
      5  ***   of the same name, to make information necessary for userspace to
      6  ***   call into the kernel available to libc.  It contains only constants,
      7  ***   structures, and macros generated from the original header, and thus,
      8  ***   contains no copyrightable information.
      9  ***
     10  ***   To edit the content of this header, modify the corresponding
     11  ***   source file (e.g. under external/kernel-headers/original/) then
     12  ***   run bionic/libc/kernel/tools/update_all.py
     13  ***
     14  ***   Any manual change here will be lost the next time this script will
     15  ***   be run. You've been warned!
     16  ***
     17  ****************************************************************************
     18  ****************************************************************************/
     19 #ifndef __ASM_ARM_BYTEORDER_H
     20 #define __ASM_ARM_BYTEORDER_H
     21 #include <linux/compiler.h>
     22 #include <asm/types.h>
     23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     24 static inline __attribute_const__ __u32 ___arch__swab32(__u32 x)
     25 {
     26  __u32 t;
     27 #ifndef __thumb__
     28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     29  if (!__builtin_constant_p(x)) {
     30  __asm__ ("eor\t%0, %1, %1, ror #16" : "=r" (t) : "r" (x));
     31  } else
     32 #endif
     33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     34  t = x ^ ((x << 16) | (x >> 16));
     35  x = (x << 24) | (x >> 8);
     36  t &= ~0x00FF0000;
     37  x ^= (t >> 8);
     38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     39  return x;
     40 }
     41 #define __arch__swab32(x) ___arch__swab32(x)
     42 #ifndef __STRICT_ANSI__
     43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     44 #define __BYTEORDER_HAS_U64__
     45 #define __SWAB_64_THRU_32__
     46 #endif
     47 #ifdef __ARMEB__
     48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     49 #include <linux/byteorder/big_endian.h>
     50 #else
     51 #include <linux/byteorder/little_endian.h>
     52 #endif
     53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     54 #endif
     55