blob: a5cf4ab6b5a86c59e71ca651c83a371c3d55679a [file] [log] [blame]
The Android Open Source Project1dc9e472009-03-03 19:28:35 -08001/****************************************************************************
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 ***
Ben Cheng654325d2012-03-07 21:13:49 -080010 *** 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 ***
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080017 ****************************************************************************
18 ****************************************************************************/
19#ifndef __ASM_ARM_BYTEORDER_H
20#define __ASM_ARM_BYTEORDER_H
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080021#include <linux/compiler.h>
22#include <asm/types.h>
Ben Cheng654325d2012-03-07 21:13:49 -080023/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080024static inline __attribute_const__ __u32 ___arch__swab32(__u32 x)
25{
26 __u32 t;
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080027#ifndef __thumb__
Ben Cheng654325d2012-03-07 21:13:49 -080028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080029 if (!__builtin_constant_p(x)) {
Martin Storsjo57751632010-12-08 09:33:51 +010030 __asm__ ("eor\t%0, %1, %1, ror #16" : "=r" (t) : "r" (x));
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080031 } else
32#endif
Ben Cheng654325d2012-03-07 21:13:49 -080033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080034 t = x ^ ((x << 16) | (x >> 16));
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080035 x = (x << 24) | (x >> 8);
36 t &= ~0x00FF0000;
37 x ^= (t >> 8);
Ben Cheng654325d2012-03-07 21:13:49 -080038/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080039 return x;
40}
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080041#define __arch__swab32(x) ___arch__swab32(x)
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080042#ifndef __STRICT_ANSI__
Ben Cheng654325d2012-03-07 21:13:49 -080043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080044#define __BYTEORDER_HAS_U64__
45#define __SWAB_64_THRU_32__
46#endif
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080047#ifdef __ARMEB__
Ben Cheng654325d2012-03-07 21:13:49 -080048/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080049#include <linux/byteorder/big_endian.h>
50#else
51#include <linux/byteorder/little_endian.h>
52#endif
Ben Cheng654325d2012-03-07 21:13:49 -080053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080054#endif