From 554fd8c5195424bdbcabf5de30fdc183aba391bd Mon Sep 17 00:00:00 2001 From: upstream source tree Date: Sun, 15 Mar 2015 20:14:05 -0400 Subject: obtained gcc-4.6.4.tar.bz2 from upstream website; verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository. --- gcc/config/h8300/genmova.sh | 198 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 198 insertions(+) create mode 100644 gcc/config/h8300/genmova.sh (limited to 'gcc/config/h8300/genmova.sh') diff --git a/gcc/config/h8300/genmova.sh b/gcc/config/h8300/genmova.sh new file mode 100644 index 000000000..59f0b4629 --- /dev/null +++ b/gcc/config/h8300/genmova.sh @@ -0,0 +1,198 @@ +#!/bin/sh +# Generate mova.md, a file containing patterns that can be implemented +# using the h8sx mova instruction. + +# Copyright (C) 2004, 2009 Free Software Foundation, Inc. +# +# This file is part of GCC. +# +# GCC is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3, or (at your option) +# any later version. +# +# GCC is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GCC; see the file COPYING3. If not see +# . + +echo ";; -*- buffer-read-only: t -*-" +echo ";; Generated automatically from genmova.sh" +echo ";; Copyright (C) 2004, 2009 Free Software Foundation, Inc." +echo ";;" +echo ";; This file is part of GCC." +echo ";;" +echo ";; GCC is free software; you can redistribute it and/or modify" +echo ";; it under the terms of the GNU General Public License as published by" +echo ";; the Free Software Foundation; either version 3, or (at your option)" +echo ";; any later version." +echo ";;" +echo ";; GCC is distributed in the hope that it will be useful," +echo ";; but WITHOUT ANY WARRANTY; without even the implied warranty of" +echo ";; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the" +echo ";; GNU General Public License for more details." +echo ";;" +echo ";; You should have received a copy of the GNU General Public License" +echo ";; along with GCC; see the file COPYING3. If not see" +echo ";; ." + +# Loop over modes for the source operand (the index). Only 8-bit and +# 16-bit indices are allowed. +for s in QI HI; do + + # Set $src to the operand syntax for this size of index. + case $s in + QI) src=%X1.b;; + HI) src=%T1.w;; + esac + + # A match_operand for the source. + operand="(match_operand:$s 1 \"h8300_dst_operand\" \"0,rQ\")" + + # Loop over the destination register's mode. The QI and HI versions use + # the same instructions as the SI ones, they just ignore the upper bits + # of the result. + for d in QI HI SI; do + + # If the destination is larger than the source, include a + # zero_extend/plus pattern. We could also match zero extensions + # of memory without the plus, but it's not any smaller or faster + # than separate insns. + case $d:$s in + SI:QI | SI:HI | HI:QI) + cat <