OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [config/] [rs6000/] [genopt.sh] - Blame information for rev 867

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 709 jeremybenn
#!/bin/sh
2
# Generate rs6000-tables.opt from the list of CPUs in rs6000-cpus.def.
3
# Copyright (C) 2011 Free Software Foundation, Inc.
4
#
5
# This file is part of GCC.
6
#
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.
11
#
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.
16
#
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/>.
20
 
21
cat <<EOF
22
; -*- buffer-read-only: t -*-
23
; Generated automatically by genopt.sh from rs6000-cpus.def.
24
 
25
; Copyright (C) 2011 Free Software Foundation, Inc.
26
;
27
; This file is part of GCC.
28
;
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.
33
;
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.
38
;
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/>.
42
 
43
Enum
44
Name(rs6000_cpu_opt_value) Type(int)
45
Known CPUs (for use with the -mcpu= and -mtune= options):
46
 
47
EnumValue
48
Enum(rs6000_cpu_opt_value) String(native) Value(RS6000_CPU_OPTION_NATIVE) DriverOnly
49
 
50
EOF
51
 
52
awk -F'[(,      ]+' '
53
BEGIN {
54
    value = 0
55
}
56
 
57
/^RS6000_CPU/ {
58
    name = $2
59
    gsub("\"", "", name)
60
    print "EnumValue"
61
    print "Enum(rs6000_cpu_opt_value) String(" name ") Value(" value ")"
62
    print ""
63
    value++
64
}' $1/rs6000-cpus.def

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.