* g++.dg/torture/pr81360.C: Drop unintended -O2 from dg-options and
[official-gcc.git] / gcc / config / m68k / genopt.sh
bloba4082ed89e44d5346f4176569b708e89c3b348d8
1 #!/bin/sh
2 # Generate m68k-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 m68k-devices.def,
24 ; m68k-isas.def and m68k-microarchs.def.
26 ; Copyright (C) 2011-2018 Free Software Foundation, Inc.
28 ; This file is part of GCC.
30 ; GCC is free software; you can redistribute it and/or modify it under
31 ; the terms of the GNU General Public License as published by the Free
32 ; Software Foundation; either version 3, or (at your option) any later
33 ; version.
35 ; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
36 ; WARRANTY; without even the implied warranty of MERCHANTABILITY or
37 ; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
38 ; for more details.
40 ; You should have received a copy of the GNU General Public License
41 ; along with GCC; see the file COPYING3. If not see
42 ; <http://www.gnu.org/licenses/>.
44 Enum
45 Name(target_device) Type(enum target_device)
46 Known M68K CPUs (for use with the -mcpu= option):
48 EOF
50 awk -F'[(, ]+' '/^M68K_DEVICE/ {
51 name = $2
52 enum = $3
53 gsub("\"", "", name)
54 print "EnumValue"
55 print "Enum(target_device) String(" name ") Value(" enum ")"
56 print ""
57 }' $1/m68k-devices.def
59 cat <<EOF
60 Enum
61 Name(uarch_type) Type(enum uarch_type)
62 Known M68K microarchitectures (for use with the -mtune= option):
64 EOF
66 awk -F'[(, ]+' '/^M68K_MICROARCH/ {
67 name = $2
68 enum = $4
69 gsub("\"", "", name)
70 print "EnumValue"
71 print "Enum(uarch_type) String(" name ") Value(u" enum ")"
72 print ""
73 }' $1/m68k-microarchs.def
75 cat <<EOF
76 Enum
77 Name(m68k_isa) Type(int)
78 Known M68K ISAs (for use with the -march= option):
80 EOF
82 awk -F'[(, ]+' 'BEGIN {
83 value = 0
85 /^M68K_ISA/ {
86 name = $2
87 gsub("\"", "", name)
88 print "EnumValue"
89 print "Enum(m68k_isa) String(" name ") Value(" value ")"
90 print ""
91 value++
92 }' $1/m68k-isas.def