File: asm-bsr.m4

package info (click to toggle)
gmap 2019-01-24-1
  • links: PTS, VCS
  • area: non-free
  • in suites: buster
  • size: 30,600 kB
  • sloc: ansic: 474,114; perl: 6,114; sh: 4,261; makefile: 926
file content (16 lines) | stat: -rw-r--r-- 396 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

AC_DEFUN([ACX_ASM_BSR], [
AC_LANG_SAVE
AC_LANG(C)

AC_MSG_CHECKING(for bsr instruction in assembly)
AC_RUN_IFELSE(
  [AC_LANG_PROGRAM([[ ]],
                   [[int msb; unsigned int x = rand(); asm("bsr %1,%0" : "=r"(msb) : "r"(x));]])],
  [AC_MSG_RESULT(yes)
   AC_DEFINE([HAVE_ASM_BSR],[1],[Define to 1 if bsr command is available in assembly])],
  [AC_MSG_RESULT(no)])

AC_LANG_RESTORE
])