Add support for __builtin_bswap16.

This commit is contained in:
Dag-Erling Smørgrav 2016-09-15 11:09:34 +02:00 committed by Dag-Erling Smørgrav
parent acb4f9f1bc
commit 1ce9c07b8b

View file

@ -24,6 +24,7 @@
# The macro currently supports the following built-in functions:
#
# __builtin_assume_aligned
# __builtin_bswap16
# __builtin_bswap32
# __builtin_bswap64
# __builtin_choose_expr
@ -90,7 +91,7 @@
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 2
#serial 3
AC_DEFUN([AX_GCC_BUILTIN], [
AS_VAR_PUSHDEF([ac_var], [ax_cv_have_$1])
@ -99,6 +100,7 @@ AC_DEFUN([AX_GCC_BUILTIN], [
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [
m4_case([$1],
[__builtin_assume_aligned], [$1("", 0)],
[__builtin_bswap16], [$1(0)],
[__builtin_bswap32], [$1(0)],
[__builtin_bswap64], [$1(0)],
[__builtin_choose_expr], [$1(0, 0, 0)],