11 # Entry can be either just a function name or "function/qualifier"
12 real_entry
="${entry%%/*}"
13 if [ "$entry" = "$real_entry" ]; then
19 echo "__SYSCALL_${abi}($nr, $real_entry, $qualifier)"
28 if [ "$abi" = "64" -a -n "$compat" ]; then
29 echo "a compat entry for a 64-bit syscall makes no sense" >&2
33 if [ -z "$compat" ]; then
34 if [ -n "$entry" ]; then
35 syscall_macro
"$abi" "$nr" "$entry"
38 echo "#ifdef CONFIG_X86_32"
39 if [ -n "$entry" ]; then
40 syscall_macro
"$abi" "$nr" "$entry"
43 syscall_macro
"$abi" "$nr" "$compat"
48 grep '^[0-9]' "$in" |
sort -n |
(
49 while read nr abi name entry compat
; do
50 abi
=`echo "$abi" | tr '[a-z]' '[A-Z]'`
51 if [ "$abi" = "COMMON" -o "$abi" = "64" ]; then
52 # COMMON is the same as 64, except that we don't expect X32
53 # programs to use it. Our expectation has nothing to do with
54 # any generated code, so treat them the same.
55 emit
64 "$nr" "$entry" "$compat"
56 elif [ "$abi" = "X32" ]; then
57 # X32 is equivalent to 64 on an X32-compatible kernel.
58 echo "#ifdef CONFIG_X86_X32_ABI"
59 emit
64 "$nr" "$entry" "$compat"
61 elif [ "$abi" = "I386" ]; then
62 emit
"$abi" "$nr" "$entry" "$compat"
64 echo "Unknown abi $abi" >&2