summaryrefslogtreecommitdiffstats
path: root/tests/default-integers
blob: a33e51a69b121be0ef95d4ab74fe3401e38397bd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# -*- sh -*-
# See LICENSE file for copyright and license details.

for arch in $(getnamelist ARCH); do
	archn=$(getnum ARCH $arch)
	if ! issupported $os $arch; then
		continue
	fi

	if test $arch = M68K; then
		maxalign=16
	elif test $arch = I386 || \
	     test $arch = ARM_OABI_LE || \
	     test $arch = ARM_OABI_BE || \
	     test $arch = SH_LE || \
	     test $arch = SH_BE || \
	     test $arch = MICROBLAZE_32_LE || \
	     test $arch = MICROBLAZE_32_BE; then
		maxalign=32
	else
		maxalign=64
	fi

	for width in 8 16 32 64; do
		test "$(get-integer-alignment.tu $osn $archn $width $os $arch)" = $(min $maxalign $width)
	done
done