summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2012-12-01 15:06:56 +0000
committerMans Rullgard <mans@mansr.com>2012-12-07 16:54:03 +0000
commitc6ebc9faa2210d7f36a3036c357f6f199520f575 (patch)
tree34bcaabe0b2e8688eba07246749d8f8aa2eebe95
parent7fd90119bbf19632135eec59bb2cd4eb30315513 (diff)
configure: add check_insn function
The check_insn function tests an instruction in both inline asm and standalone assembly, and sets _external/_inline config properties accordingly. Signed-off-by: Mans Rullgard <mans@mansr.com>
-rwxr-xr-xconfigure6
1 files changed, 6 insertions, 0 deletions
diff --git a/configure b/configure
index fe95251c68..6758438e11 100755
--- a/configure
+++ b/configure
@@ -698,6 +698,12 @@ void foo(void){ __asm__ volatile($code); }
EOF
}
+check_insn(){
+ log check_insn "$@"
+ check_inline_asm ${1}_inline "\"$2\""
+ echo "$2" | check_as && enable ${1}_external || disable ${1}_external
+}
+
check_yasm(){
log check_yasm "$@"
echo "$1" > $TMPS