/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _UAPI__ALPHA_COMPILER_H #define _UAPI__ALPHA_COMPILER_H /* * Herein are macros we use when describing various patterns we want to GCC. * In all cases we can get better schedules out of the compiler if we hide * as little as possible inside inline assembly. However, we want to be * able to know what we'll get out before giving up inline assembly. Thus * these tests and macros. */ #if __GNUC__ == 3 && __GNUC_MINOR__ >= 4 || __GNUC__ > 3 # define __kernel_insbl(val, shift) __builtin_alpha_insbl(val, shift) # define __kernel_inswl(val, shift) __builtin_alpha_inswl(val, shift) # define __kernel_insql(val, shift) __builtin_alpha_insql(val, shift) # define __kernel_inslh(val, shift) __builtin_alpha_inslh(val, shift) # define __kernel_extbl(val, shift) __builtin_alpha_extbl(val, shift) # define __kernel_extwl(val, shift) __builtin_alpha_extwl(val, shift) # define __kernel_cmpbge(a, b) __builtin_alpha_cmpbge(a, b) #else # define __kernel_insbl(val, shift) \ ({ unsigned long __kir; \ __asm__("insbl %2,%1,%0" : "=r"(__kir) : "rI"(shift), "r"(val)); \ __kir; }) # define __kernel_inswl(val, shift) \ ({ unsigned long __kir; \ __asm__("inswl %2,%1,%0" : "=r"(__kir) : "rI"(shift), "r"(val)); \ __kir; }) # define __kernel_insql(val, shift) \ ({ unsigned long __kir; \ __asm__("insql %2,%1,%0" : "=r"(__kir) : "rI"(shift), "r"(val)); \ __kir; }) # define __kernel_inslh(val, shift) \ ({ unsigned long __kir; \ __asm__("inslh %2,%1,%0" : "=r"(__kir) : "rI"(shift), "r"(val)); \ __kir; }) # define __kernel_extbl(val, shift) \ ({ unsigned long __kir; \ __asm__("extbl %2,%1,%0" : "=r"(__kir) : "rI"(shift), "r"(val)); \ __kir; }) # define __kernel_extwl(val, shift) \ ({ unsigned long __kir; \ __asm__("extwl %2,%1,%0" : "=r"(__kir) : "rI"(shift), "r"(val)); \ __kir; }) # define __kernel_cmpbge(a, b) \ ({ unsigned long __kir; \ __asm__("cmpbge %r2,%1,%0" : "=r"(__kir) : "rI"(b), "rJ"(a)); \ __kir; }) #endif #ifdef __alpha_cix__ # if __GNUC__ == 3 && __GNUC_MINOR__ >= 4 || __GNUC__ > 3 # define __kernel_cttz(x) __builtin_ctzl(x) # define __kernel_ctlz(x) __builtin_clzl(x) # define __kernel_ctpop(x) __builtin_popcountl(x) # else # define __kernel_cttz(x) \ ({ unsigned long __kir; \ __asm__("cttz %1,%0" : "=r"(__kir) : "r"(x)); \ __kir; }) # define __kernel_ctlz(x) \ ({ unsigned long __kir; \ __asm__("ctlz %1,%0" : "=r"(__kir) : "r"(x)); \ __kir; }) # define __kernel_ctpop(x) \ ({ unsigned long __kir; \ __asm__("ctpop %1,%0" : "=r"(__kir) : "r"(x)); \ __kir; }) # endif #else # define __kernel_cttz(x) \ ({ unsigned long __kir; \ __asm__(".arch ev67; cttz %1,%0" : "=r"(__kir) : "r"(x)); \ __kir; }) # define __kernel_ctlz(x) \ ({ unsigned long __kir; \ __asm__(".arch ev67; ctlz %1,%0" : "=r"(__kir) : "r"(x)); \ __kir; }) # define __kernel_ctpop(x) \ ({ unsigned long __kir; \ __asm__(".arch ev67; ctpop %1,%0" : "=r"(__kir) : "r"(x)); \ __kir; }) #endif /* * Beginning with EGCS 1.1, GCC defines __alpha_bwx__ when the BWX * extension is enabled. Previous versions did not define anything * we could test during compilation -- too bad, so sad. */ #if defined(__alpha_bwx__) #define __kernel_ldbu(mem) (mem) #define __kernel_ldwu(mem) (mem) #define __kernel_stb(val,mem) ((mem) = (val)) #define __kernel_stw(val,mem) ((mem) = (val)) #else #define __kernel_ldbu(mem) \ ({ unsigned char __kir; \ __asm__(".arch ev56; \ ldbu %0,%1" : "=r"(__kir) : "m"(mem)); \ __kir; }) #define __kernel_ldwu(mem) \ ({ unsigned short __kir; \ __asm__(".arch ev56; \ ldwu %0,%1" : "=r"(__kir) : "m"(mem)); \ __kir; }) #define __kernel_stb(val,mem) \ __asm__(".arch ev56; \ stb %1,%0" : "=m"(mem) : "r"(val)) #define __kernel_stw(val,mem) \ __asm__(".arch ev56; \ stw %1,%0" : "=m"(mem) : "r"(val)) #endif #endif /* _UAPI__ALPHA_COMPILER_H */
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
Kbuild | File | 101 B | 0644 |
|
a.out.h | File | 2 KB | 0644 |
|
auxvec.h | File | 774 B | 0644 |
|
bitsperlong.h | File | 237 B | 0644 |
|
byteorder.h | File | 194 B | 0644 |
|
compiler.h | File | 4.12 KB | 0644 |
|
console.h | File | 1.15 KB | 0644 |
|
errno.h | File | 5.31 KB | 0644 |
|
fcntl.h | File | 1.86 KB | 0644 |
|
fpu.h | File | 4.52 KB | 0644 |
|
gentrap.h | File | 1.43 KB | 0644 |
|
ioctl.h | File | 2.3 KB | 0644 |
|
ioctls.h | File | 4.32 KB | 0644 |
|
ipcbuf.h | File | 95 B | 0644 |
|
kvm_para.h | File | 97 B | 0644 |
|
mman.h | File | 3.45 KB | 0644 |
|
msgbuf.h | File | 922 B | 0644 |
|
pal.h | File | 1.01 KB | 0644 |
|
param.h | File | 313 B | 0644 |
|
poll.h | File | 93 B | 0644 |
|
posix_types.h | File | 513 B | 0644 |
|
ptrace.h | File | 1.66 KB | 0644 |
|
reg.h | File | 1005 B | 0644 |
|
regdef.h | File | 1.04 KB | 0644 |
|
resource.h | File | 761 B | 0644 |
|
sembuf.h | File | 670 B | 0644 |
|
setup.h | File | 1.43 KB | 0644 |
|
shmbuf.h | File | 1.08 KB | 0644 |
|
sigcontext.h | File | 891 B | 0644 |
|
siginfo.h | File | 468 B | 0644 |
|
signal.h | File | 3.08 KB | 0644 |
|
socket.h | File | 2.54 KB | 0644 |
|
sockios.h | File | 497 B | 0644 |
|
stat.h | File | 1.05 KB | 0644 |
|
statfs.h | File | 314 B | 0644 |
|
swab.h | File | 1.25 KB | 0644 |
|
sysinfo.h | File | 775 B | 0644 |
|
termbits.h | File | 5.14 KB | 0644 |
|
termios.h | File | 1.49 KB | 0644 |
|
types.h | File | 884 B | 0644 |
|
unistd.h | File | 14.99 KB | 0644 |
|