Release 4.11 arch/s390/include/uapi/asm/swab.h
#ifndef _S390_SWAB_H
#define _S390_SWAB_H
/*
* S390 version
* Copyright IBM Corp. 1999
* Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com)
*/
#include <linux/types.h>
#ifndef __s390x__
# define __SWAB_64_THRU_32__
#endif
#ifdef __s390x__
static inline __u64 __arch_swab64p(const __u64 *x)
{
__u64 result;
asm volatile("lrvg %0,%1" : "=d" (result) : "m" (*x));
return result;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Harvey Harrison | 21 | 100.00% | 1 | 100.00% |
Total | 21 | 100.00% | 1 | 100.00% |
#define __arch_swab64p __arch_swab64p
static inline __u64 __arch_swab64(__u64 x)
{
__u64 result;
asm volatile("lrvgr %0,%1" : "=d" (result) : "d" (x));
return result;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Harvey Harrison | 19 | 100.00% | 1 | 100.00% |
Total | 19 | 100.00% | 1 | 100.00% |
#define __arch_swab64 __arch_swab64
static inline void __arch_swab64s(__u64 *x)
{
*x = __arch_swab64p(x);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Harvey Harrison | 19 | 100.00% | 1 | 100.00% |
Total | 19 | 100.00% | 1 | 100.00% |
#define __arch_swab64s __arch_swab64s
#endif /* __s390x__ */
static inline __u32 __arch_swab32p(const __u32 *x)
{
__u32 result;
asm volatile(
#ifndef __s390x__
" icm %0,8,%O1+3(%R1)\n"
" icm %0,4,%O1+2(%R1)\n"
" icm %0,2,%O1+1(%R1)\n"
" ic %0,%1"
: "=&d" (result) : "Q" (*x) : "cc");
#else /* __s390x__ */
" lrv %0,%1"
: "=d" (result) : "m" (*x));
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Harvey Harrison | 37 | 97.37% | 1 | 50.00% |
Martin Schwidefsky | 1 | 2.63% | 1 | 50.00% |
Total | 38 | 100.00% | 2 | 100.00% |
#endif /* __s390x__ */
return result;
}
#define __arch_swab32p __arch_swab32p
#ifdef __s390x__
static
inline __u32 __arch_swab32(__u32 x)
{
__u32 result;
asm volatile("lrvr %0,%1" : "=d" (result) : "d" (x));
return result;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Harvey Harrison | 19 | 100.00% | 1 | 100.00% |
Total | 19 | 100.00% | 1 | 100.00% |
#define __arch_swab32 __arch_swab32
#endif /* __s390x__ */
static inline __u16 __arch_swab16p(const __u16 *x)
{
__u16 result;
asm volatile(
#ifndef __s390x__
" icm %0,2,%O1+1(%R1)\n"
" ic %0,%1\n"
: "=&d" (result) : "Q" (*x) : "cc");
#else /* __s390x__ */
" lrvh %0,%1"
: "=d" (result) : "m" (*x));
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Harvey Harrison | 37 | 97.37% | 1 | 50.00% |
Martin Schwidefsky | 1 | 2.63% | 1 | 50.00% |
Total | 38 | 100.00% | 2 | 100.00% |
#endif /* __s390x__ */
return result;
}
#define __arch_swab16p __arch_swab16p
#endif /* _S390_SWAB_H */
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Harvey Harrison | 221 | 98.22% | 1 | 20.00% |
Heiko Carstens | 2 | 0.89% | 2 | 40.00% |
Martin Schwidefsky | 2 | 0.89% | 2 | 40.00% |
Total | 225 | 100.00% | 5 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.