San Mehat | 9163872 | 2010-04-06 18:49:49 -0700 | [diff] [blame] | 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 | *** |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 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 | *** |
San Mehat | 9163872 | 2010-04-06 18:49:49 -0700 | [diff] [blame] | 17 | **************************************************************************** |
| 18 | ****************************************************************************/ |
| 19 | #ifndef _LINUX_SWAB_H |
| 20 | #define _LINUX_SWAB_H |
San Mehat | 9163872 | 2010-04-06 18:49:49 -0700 | [diff] [blame] | 21 | #include <linux/types.h> |
| 22 | #include <linux/compiler.h> |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 23 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
San Mehat | 9163872 | 2010-04-06 18:49:49 -0700 | [diff] [blame] | 24 | #include <asm/swab.h> |
San Mehat | 9163872 | 2010-04-06 18:49:49 -0700 | [diff] [blame] | 25 | #define ___constant_swab16(x) ((__u16)( (((__u16)(x) & (__u16)0x00ffU) << 8) | (((__u16)(x) & (__u16)0xff00U) >> 8))) |
San Mehat | 9163872 | 2010-04-06 18:49:49 -0700 | [diff] [blame] | 26 | #define ___constant_swab32(x) ((__u32)( (((__u32)(x) & (__u32)0x000000ffUL) << 24) | (((__u32)(x) & (__u32)0x0000ff00UL) << 8) | (((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | (((__u32)(x) & (__u32)0xff000000UL) >> 24))) |
San Mehat | 9163872 | 2010-04-06 18:49:49 -0700 | [diff] [blame] | 27 | #define ___constant_swab64(x) ((__u64)( (((__u64)(x) & (__u64)0x00000000000000ffULL) << 56) | (((__u64)(x) & (__u64)0x000000000000ff00ULL) << 40) | (((__u64)(x) & (__u64)0x0000000000ff0000ULL) << 24) | (((__u64)(x) & (__u64)0x00000000ff000000ULL) << 8) | (((__u64)(x) & (__u64)0x000000ff00000000ULL) >> 8) | (((__u64)(x) & (__u64)0x0000ff0000000000ULL) >> 24) | (((__u64)(x) & (__u64)0x00ff000000000000ULL) >> 40) | (((__u64)(x) & (__u64)0xff00000000000000ULL) >> 56))) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 28 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
San Mehat | 9163872 | 2010-04-06 18:49:49 -0700 | [diff] [blame] | 29 | #define ___constant_swahw32(x) ((__u32)( (((__u32)(x) & (__u32)0x0000ffffUL) << 16) | (((__u32)(x) & (__u32)0xffff0000UL) >> 16))) |
San Mehat | 9163872 | 2010-04-06 18:49:49 -0700 | [diff] [blame] | 30 | #define ___constant_swahb32(x) ((__u32)( (((__u32)(x) & (__u32)0x00ff00ffUL) << 8) | (((__u32)(x) & (__u32)0xff00ff00UL) >> 8))) |
San Mehat | 9163872 | 2010-04-06 18:49:49 -0700 | [diff] [blame] | 31 | #ifdef __arch_swab16 |
| 32 | #else |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 33 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
San Mehat | 9163872 | 2010-04-06 18:49:49 -0700 | [diff] [blame] | 34 | #endif |
| 35 | #ifdef __arch_swab32 |
| 36 | #else |
| 37 | #endif |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 38 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
San Mehat | 9163872 | 2010-04-06 18:49:49 -0700 | [diff] [blame] | 39 | #ifdef __arch_swab64 |
| 40 | #elif defined(__SWAB_64_THRU_32__) |
| 41 | #else |
| 42 | #endif |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 43 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
San Mehat | 9163872 | 2010-04-06 18:49:49 -0700 | [diff] [blame] | 44 | #ifdef __arch_swahw32 |
| 45 | #else |
| 46 | #endif |
| 47 | #ifdef __arch_swahb32 |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 48 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
San Mehat | 9163872 | 2010-04-06 18:49:49 -0700 | [diff] [blame] | 49 | #else |
| 50 | #endif |
| 51 | #define __swab16(x) (__builtin_constant_p((__u16)(x)) ? ___constant_swab16(x) : __fswab16(x)) |
| 52 | #define __swab32(x) (__builtin_constant_p((__u32)(x)) ? ___constant_swab32(x) : __fswab32(x)) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 53 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
San Mehat | 9163872 | 2010-04-06 18:49:49 -0700 | [diff] [blame] | 54 | #define __swab64(x) (__builtin_constant_p((__u64)(x)) ? ___constant_swab64(x) : __fswab64(x)) |
| 55 | #define __swahw32(x) (__builtin_constant_p((__u32)(x)) ? ___constant_swahw32(x) : __fswahw32(x)) |
| 56 | #define __swahb32(x) (__builtin_constant_p((__u32)(x)) ? ___constant_swahb32(x) : __fswahb32(x)) |
| 57 | #ifdef __arch_swab16p |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 58 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
San Mehat | 9163872 | 2010-04-06 18:49:49 -0700 | [diff] [blame] | 59 | #else |
| 60 | #endif |
| 61 | #ifdef __arch_swab32p |
| 62 | #else |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 63 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
San Mehat | 9163872 | 2010-04-06 18:49:49 -0700 | [diff] [blame] | 64 | #endif |
| 65 | #ifdef __arch_swab64p |
| 66 | #else |
| 67 | #endif |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 68 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
San Mehat | 9163872 | 2010-04-06 18:49:49 -0700 | [diff] [blame] | 69 | #ifdef __arch_swahw32p |
| 70 | #else |
| 71 | #endif |
| 72 | #ifdef __arch_swahb32p |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 73 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
San Mehat | 9163872 | 2010-04-06 18:49:49 -0700 | [diff] [blame] | 74 | #else |
| 75 | #endif |
| 76 | #ifdef __arch_swab16s |
| 77 | #else |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 78 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
San Mehat | 9163872 | 2010-04-06 18:49:49 -0700 | [diff] [blame] | 79 | #endif |
| 80 | #ifdef __arch_swab32s |
| 81 | #else |
| 82 | #endif |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 83 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
San Mehat | 9163872 | 2010-04-06 18:49:49 -0700 | [diff] [blame] | 84 | #ifdef __arch_swab64s |
| 85 | #else |
| 86 | #endif |
| 87 | #ifdef __arch_swahw32s |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 88 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
San Mehat | 9163872 | 2010-04-06 18:49:49 -0700 | [diff] [blame] | 89 | #else |
| 90 | #endif |
| 91 | #ifdef __arch_swahb32s |
| 92 | #else |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame] | 93 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
San Mehat | 9163872 | 2010-04-06 18:49:49 -0700 | [diff] [blame] | 94 | #endif |
| 95 | #endif |