2010-03-12 Jb Evain <jbevain@novell.com>
[mono.git] / mono / arch / arm / dpiops.sh
1 #!/bin/bash
2
3 OPCODES="AND EOR SUB RSB ADD ADC SBC RSC ORR BIC"
4 CMP_OPCODES="TST TEQ CMP CMN"
5 MOV_OPCODES="MOV MVN"
6
7 # $1: opcode list
8 # $2: template
9 function gen() {
10         for i in $1; do
11                 sed "s/<Op>/$i/g" $2.th
12         done
13 }
14
15
16
17 echo -e "/* Macros for DPI ops, auto-generated from template */\n"
18
19 echo -e "\n/* mov/mvn */\n"
20 gen "$MOV_OPCODES" mov_macros
21
22 echo -e "\n/* DPIs, arithmetic and logical */\n"
23 gen "$OPCODES" dpi_macros
24
25 echo -e "\n\n"
26
27 echo -e "\n/* DPIs, comparison */\n"
28 gen "$CMP_OPCODES" cmp_macros
29
30 echo -e "\n/* end generated */\n"