2 # SPDX-License-Identifier: GPL-2.0
6 my_abis
=`echo "($3)" | tr ',' '|'`
10 fileguard
=LINUX_USER_ALPHA_
`basename "$out" | sed \
11 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \
12 -e 's/[^A-Z0-9_]/_/g' -e 's/__/_/g'`
13 grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" |
sort -n |
(
14 printf "#ifndef %s\n" "${fileguard}"
15 printf "#define %s\n" "${fileguard}"
19 while read nr abi name entry
; do
20 if [ -z "$offset" ]; then
21 printf "#define TARGET_NR_%s%s\t%s\n" \
22 "${prefix}" "${name}" "${nr}"
24 printf "#define TARGET_NR_%s%s\t(%s + %s)\n" \
25 "${prefix}" "${name}" "${offset}" "${nr}"
31 printf "#endif /* %s */" "${fileguard}"