 06e2329636
			
		
	
	
		06e2329636
		
	
	
	
	
		
			
			The 'GPL-2.0' license identifier has been deprecated since license list version 3.0 [1] and replaced by the 'GPL-2.0-only' tag [2]. [1] https://spdx.org/licenses/GPL-2.0.html [2] https://spdx.org/licenses/GPL-2.0-only.html Mechanical patch running: $ sed -i -e s/GPL-2.0/GPL-2.0-only/ \ $(git grep -l 'SPDX-License-Identifier: GPL-2.0[ $]' \ | egrep -v '^linux-headers|^include/standard-headers') Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
		
			
				
	
	
		
			33 lines
		
	
	
		
			878 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			878 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
| #!/bin/sh
 | |
| # SPDX-License-Identifier: GPL-2.0-only
 | |
| 
 | |
| in="$1"
 | |
| out="$2"
 | |
| my_abis=`echo "($3)" | tr ',' '|'`
 | |
| prefix="$4"
 | |
| offset="$5"
 | |
| 
 | |
| fileguard=LINUX_USER_SH4_`basename "$out" | sed \
 | |
|     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \
 | |
|     -e 's/[^A-Z0-9_]/_/g' -e 's/__/_/g'`
 | |
| grep -E "^[0-9A-Fa-fXx]+[[:space:]]+${my_abis}" "$in" | sort -n | (
 | |
|     printf "#ifndef %s\n" "${fileguard}"
 | |
|     printf "#define %s\n" "${fileguard}"
 | |
|     printf "\n"
 | |
| 
 | |
|     nxt=0
 | |
|     while read nr abi name entry ; do
 | |
|         if [ -z "$offset" ]; then
 | |
|             printf "#define TARGET_NR_%s%s\t%s\n" \
 | |
|                 "${prefix}" "${name}" "${nr}"
 | |
|         else
 | |
|             printf "#define TARGET_NR_%s%s\t(%s + %s)\n" \
 | |
|                 "${prefix}" "${name}" "${offset}" "${nr}"
 | |
|         fi
 | |
|         nxt=$((nr+1))
 | |
|     done
 | |
| 
 | |
|     printf "\n"
 | |
|     printf "#endif /* %s */" "${fileguard}"
 | |
| ) > "$out"
 |