OSDN Git Service

PR target/53789
[pf3gnuchains/gcc-fork.git] / gcc / config / c6x / genmult.sh
1 #! /bin/sh
2 # Generate c6x-mult.md from c6x-mult.md.in
3 # The input file is passed as an argument.
4
5 # Copyright 2011 Free Software Foundation, Inc.
6
7 #This file is part of GCC.
8
9 #GCC is free software; you can redistribute it and/or modify
10 #it under the terms of the GNU General Public License as published by
11 #the Free Software Foundation; either version 3, or (at your option)
12 #any later version.
13
14 #GCC is distributed in the hope that it will be useful,
15 #but WITHOUT ANY WARRANTY; without even the implied warranty of
16 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 #GNU General Public License for more details.
18
19 #You should have received a copy of the GNU General Public License
20 #along with GCC; see the file COPYING3.  If not see
21 #<http://www.gnu.org/licenses/>.
22
23 echo ";; -*- buffer-read-only: t -*-"
24 echo ";; Generated automatically from c6x-mult.md.in by genmult.sh"
25
26 sed -e "s,_VARIANT_,,g" -e "s,_SET_,set,g" -e "s,_.BRK_,,g" \
27     -e "s,_A_,a,g" -e "s,_B_,b,g" -e "s,_DESTOPERAND_,register_operand,g" \
28     -e "s,_MOD._,,g" -e "s,:_M,:,g" < $1
29
30 sed -e "s,_VARIANT_,_real,g" -e "s,_SET_,unspec,g" -e "s,_OBRK_,[,g" \
31     -e "s,_CBRK_,] UNSPEC_REAL_MULT,g" -e "s,_A_,JA,g" -e "s,_B_,JB,g" \
32     -e "s,_DESTOPERAND_,const_int_operand,g" -e "s,_MODk_,k,g" \
33     -e "s,_MODK_,K,g" -e 's,:_MV..[IQ],:SI,g' -e "s,:_MSQ,:SI,g"  < $1