OSDN Git Service

*** empty log message ***
[pf3gnuchains/sourceware.git] / cgen / gen-all-intrinsics
1 #! /bin/sh
2 # Utility script to generate the intrinsics files.
3 # This is useful for verifying changes to the generated files.
4 #
5 # Usage: gen-all-intrinsics /path/to/gcc/top [extra args]
6 #
7 # Run this script in the src/cgen directory.
8 #
9 # NOTE: The various command line arguments depend on which mep cores
10 # you're targetting.
11
12 CGEN_TOP=`pwd`
13
14 if [ $# -lt 1 ]
15 then
16     echo "Usage: gen-all-intrinsics /path/to/gcc/top [extra args]" >&2
17     exit 1
18 fi
19
20 GCC_TOP=$1 ; shift
21 if [ ! -d ${GCC_TOP}/gcc/config/mep ]
22 then
23     echo "Not a gcc top level directory: $GCC_TOP" >&2
24     exit 1
25 fi
26
27 (
28     cd ${GCC_TOP}/gcc/config/mep
29     guile -s ${CGEN_TOP}/cgen-intrinsics.scm -s ${CGEN_TOP} \
30         -a ${CGEN_TOP}/cpu/mep.cpu \
31         -m mep,c5 \
32         -i mep,ext_core1,ext_cop1_16,ext_cop1_32,ext_cop1_48,ext_cop1_64 \
33         -K mep,ext_core1,ext_cop1_16,ext_cop1_32,ext_cop1_48,ext_cop1_64 \
34         -M intrinsics.md -N mep-intrin.h -P intrinsics.h \
35         -b \
36         "$@"
37 )