#!/bin/sh # Generate mova.md, a file containing patterns that can be implemented # using the h8sx mova instruction. echo ";; -*- buffer-read-only: t -*-" echo ";; Generated automatically from genmova.sh" # 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 <