3 # Worker script for libgcc/Makefile.in
4 # Generate lists of fixed-point labels, funcs, modes, from, to.
6 # gen-fixed.sh arith labels
7 # gen-fixed.sh arith funcs
8 # gen-fixed.sh arith modes
9 # gen-fixed.sh conv labels
10 # gen-fixed.sh conv funcs
11 # gen-fixed.sh conv from
12 # gen-fixed.sh conv to
14 fixed_sfract_modes
="QQ HQ SQ DQ TQ HA SA DA TA"
15 fixed_ufract_modes
="UQQ UHQ USQ UDQ UTQ UHA USA UDA UTA"
16 fixed_fract_modes
="$fixed_sfract_modes $fixed_ufract_modes"
18 fixed_signed_modes
="QI HI SI DI TI SF DF"
19 fixed_unsigned_modes
="UQI UHI USI UDI UTI"
21 fixed_func_names
="_add _sub _neg _mul _mulhelper _divhelper _ashl _ashlhelper _cmp _saturate1 _saturate2"
22 fixed_sfunc_names
="_ssadd _sssub _ssneg _ssmul _ssdiv _div _ssashl _ashr"
23 fixed_ufunc_names
="_usadd _ussub _usneg _usmul _usdiv _udiv _usashl _lshr"
25 # emit the function information
26 # $1 = output type selector
27 # $2 = base function name
32 if [ "$3" != "$4" ]; then
48 for n
in $fixed_func_names; do
49 for m
in $fixed_fract_modes; do
54 for n
in $fixed_sfunc_names; do
55 for m
in $fixed_sfract_modes; do
60 for n
in $fixed_ufunc_names; do
61 for m
in $fixed_ufract_modes; do
68 for f
in $fixed_fract_modes; do
69 for t
in $fixed_fract_modes $fixed_signed_modes; do
74 for f
in $fixed_signed_modes; do
75 for t
in $fixed_fract_modes; do
80 for f
in $fixed_fract_modes $fixed_signed_modes; do
81 for t
in $fixed_fract_modes; do
82 emit
$2 _satfract
$f $t
86 for f
in $fixed_fract_modes; do
87 for t
in $fixed_unsigned_modes; do
88 emit
$2 _fractuns
$f $t
92 for f
in $fixed_unsigned_modes; do
93 for t
in $fixed_fract_modes; do
94 emit
$2 _fractuns
$f $t
98 for f
in $fixed_unsigned_modes; do
99 for t
in $fixed_fract_modes; do
100 emit
$2 _satfractuns
$f $t