RISC-V: Error if function declared with different interrupt modes.
[official-gcc.git] / gcc / config / c6x / genopt.sh
blob55567c0450378c145a1156d57dcdac75551a3141
1 #!/bin/sh
2 # Generate c6x-tables.opt from the lists in *.def.
3 # Copyright (C) 2011-2018 Free Software Foundation, Inc.
5 # This file is part of GCC.
7 # GCC is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 3, or (at your option)
10 # any later version.
12 # GCC is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with GCC; see the file COPYING3. If not see
19 # <http://www.gnu.org/licenses/>.
21 cat <<EOF
22 ; -*- buffer-read-only: t -*-
23 ; Generated automatically by genopt.sh from c6x-isas.def.
25 ; Copyright (C) 2011-2018 Free Software Foundation, Inc.
27 ; This file is part of GCC.
29 ; GCC is free software; you can redistribute it and/or modify it under
30 ; the terms of the GNU General Public License as published by the Free
31 ; Software Foundation; either version 3, or (at your option) any later
32 ; version.
34 ; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
35 ; WARRANTY; without even the implied warranty of MERCHANTABILITY or
36 ; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
37 ; for more details.
39 ; You should have received a copy of the GNU General Public License
40 ; along with GCC; see the file COPYING3. If not see
41 ; <http://www.gnu.org/licenses/>.
43 Enum
44 Name(c6x_isa) Type(int)
45 Known C6X ISAs (for use with the -march= option):
47 EOF
49 awk -F'[(, ]+' 'BEGIN {
50 value = 0
52 /^C6X_ISA/ {
53 name = $2
54 gsub("\"", "", name)
55 print "EnumValue"
56 print "Enum(c6x_isa) String(" name ") Value(" value ")"
57 print ""
58 value++
59 }' $1/c6x-isas.def