Discussion:
[libav-devel] [PATCH] configure: fix inline asm checks
Diego Biurrun
2018-06-07 21:01:08 UTC
Permalink
Commit 8c893aa3cd5 removed quotes that were required to detect
check_insn armv5te qadd r0, r0, r0
.../test.c:1:34: error: expected string literal in 'asm'
void foo(void){ __asm__ volatile(qadd r0, r0, r0); }
void foo(void){ __asm__ volatile("qadd r0, r0, r0"); }
--- a/configure
+++ b/configure
@@ -866,7 +866,7 @@ EOF
check_insn(){
- check_inline_asm ${1}_inline "$2"
+ check_inline_asm ${1}_inline "\"$2\""
check_as ${1}_external "$2"
}
This does not look like the correct fix to me. The required quotes
should be part of the convenience function instead. Notice how calls
to check_insn and check_inline_asm differ in the way they quote their
arguments. There should be no need for this inconsistency.

I'll look into it.

Diego
Luca Barbato
2018-06-07 14:05:17 UTC
Permalink
Commit 8c893aa3cd5 removed quotes that were required to detect
check_insn armv5te qadd r0, r0, r0
.../test.c:1:34: error: expected string literal in 'asm'
void foo(void){ __asm__ volatile(qadd r0, r0, r0); }
void foo(void){ __asm__ volatile("qadd r0, r0, r0"); }
---
configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure b/configure
index 5e79c0cec1..48e8536b07 100755
--- a/configure
+++ b/configure
@@ -866,7 +866,7 @@ EOF
check_insn(){
- check_inline_asm ${1}_inline "$2"
+ check_inline_asm ${1}_inline "\"$2\""
check_as ${1}_external "$2"
}
Sure.
James Almer
2018-06-08 02:05:26 UTC
Permalink
Post by Diego Biurrun
Commit 8c893aa3cd5 removed quotes that were required to detect
check_insn armv5te qadd r0, r0, r0
.../test.c:1:34: error: expected string literal in 'asm'
void foo(void){ __asm__ volatile(qadd r0, r0, r0); }
void foo(void){ __asm__ volatile("qadd r0, r0, r0"); }
--- a/configure
+++ b/configure
@@ -866,7 +866,7 @@ EOF
check_insn(){
- check_inline_asm ${1}_inline "$2"
+ check_inline_asm ${1}_inline "\"$2\""
check_as ${1}_external "$2"
}
This does not look like the correct fix to me. The required quotes
should be part of the convenience function instead. Notice how calls
to check_insn and check_inline_asm differ in the way they quote their
arguments. There should be no need for this inconsistency.
I'll look into it.
Changing all the calls from check_insn name 'insn' to check_insn name
'"insn"' would probably fix the check_inline_asm tests, but may break
the check_as tests.

I don't have an arm or qemu system to confirm the above, though.
Post by Diego Biurrun
Diego
_______________________________________________
libav-devel mailing list
https://lists.libav.org/mailman/listinfo/libav-devel
Diego Biurrun
2018-06-08 10:30:17 UTC
Permalink
Post by James Almer
Post by Diego Biurrun
Commit 8c893aa3cd5 removed quotes that were required to detect
check_insn armv5te qadd r0, r0, r0
.../test.c:1:34: error: expected string literal in 'asm'
void foo(void){ __asm__ volatile(qadd r0, r0, r0); }
void foo(void){ __asm__ volatile("qadd r0, r0, r0"); }
--- a/configure
+++ b/configure
@@ -866,7 +866,7 @@ EOF
check_insn(){
- check_inline_asm ${1}_inline "$2"
+ check_inline_asm ${1}_inline "\"$2\""
check_as ${1}_external "$2"
}
This does not look like the correct fix to me. The required quotes
should be part of the convenience function instead. Notice how calls
to check_insn and check_inline_asm differ in the way they quote their
arguments. There should be no need for this inconsistency.
I'll look into it.
Changing all the calls from check_insn name 'insn' to check_insn name
'"insn"' would probably fix the check_inline_asm tests, but may break
the check_as tests.
Complicating the function calls is not the right way to go. The helper
function should take care of the required quoting and not rely on the
callers to pass arguments in nested quotes.

Diego
Martin Storsjö
2018-06-25 11:41:30 UTC
Permalink
Post by Diego Biurrun
Post by James Almer
Post by Diego Biurrun
Commit 8c893aa3cd5 removed quotes that were required to detect
check_insn armv5te qadd r0, r0, r0
.../test.c:1:34: error: expected string literal in 'asm'
void foo(void){ __asm__ volatile(qadd r0, r0, r0); }
void foo(void){ __asm__ volatile("qadd r0, r0, r0"); }
--- a/configure
+++ b/configure
@@ -866,7 +866,7 @@ EOF
check_insn(){
- check_inline_asm ${1}_inline "$2"
+ check_inline_asm ${1}_inline "\"$2\""
check_as ${1}_external "$2"
}
This does not look like the correct fix to me. The required quotes
should be part of the convenience function instead. Notice how calls
to check_insn and check_inline_asm differ in the way they quote their
arguments. There should be no need for this inconsistency.
I'll look into it.
Changing all the calls from check_insn name 'insn' to check_insn name
'"insn"' would probably fix the check_inline_asm tests, but may break
the check_as tests.
Complicating the function calls is not the right way to go. The helper
function should take care of the required quoting and not rely on the
callers to pass arguments in nested quotes.
Ping; whoever is waiting for the other, please pick the thread up again.

// Martin
Luca Barbato
2018-06-25 14:14:39 UTC
Permalink
Post by Martin Storsjö
Post by Diego Biurrun
Post by James Almer
Post by Diego Biurrun
Commit 8c893aa3cd5 removed quotes that were required to detect
check_insn armv5te qadd r0, r0, r0
.../test.c:1:34: error: expected string literal in 'asm'
void foo(void){ __asm__ volatile(qadd r0, r0, r0); }
void foo(void){ __asm__ volatile("qadd r0, r0, r0"); }
--- a/configure
+++ b/configure
@@ -866,7 +866,7 @@ EOF
  check_insn(){
-    check_inline_asm ${1}_inline "$2"
+    check_inline_asm ${1}_inline "\"$2\""
      check_as ${1}_external "$2"
  }
This does not look like the correct fix to me. The required quotes
should be part of the convenience function instead. Notice how calls
to check_insn and check_inline_asm differ in the way they quote their
arguments. There should be no need for this inconsistency.
I'll look into it.
Changing all the calls from check_insn name 'insn' to check_insn name
'"insn"' would probably fix the check_inline_asm tests, but may break
the check_as tests.
Complicating the function calls is not the right way to go. The helper
function should take care of the required quoting and not rely on the
callers to pass arguments in nested quotes.
Ping; whoever is waiting for the other, please pick the thread up again.
I'd wait another day and merge the proposed fix if nothing better
materializes.

lu
Diego Biurrun
2018-06-29 10:38:52 UTC
Permalink
Post by Martin Storsjö
Post by Diego Biurrun
Post by Diego Biurrun
Commit 8c893aa3cd5 removed quotes that were required to detect
check_insn armv5te qadd r0, r0, r0
.../test.c:1:34: error: expected string literal in 'asm'
void foo(void){ __asm__ volatile(qadd r0, r0, r0); }
void foo(void){ __asm__ volatile("qadd r0, r0, r0"); }
--- a/configure
+++ b/configure
@@ -866,7 +866,7 @@ EOF
check_insn(){
- check_inline_asm ${1}_inline "$2"
+ check_inline_asm ${1}_inline "\"$2\""
check_as ${1}_external "$2"
}
This does not look like the correct fix to me. The required
quotes
Post by Diego Biurrun
should be part of the convenience function instead. Notice how calls
to check_insn and check_inline_asm differ in the way they quote their
arguments. There should be no need for this inconsistency.
I'll look into it.
Changing all the calls from check_insn name 'insn' to check_insn name
'"insn"' would probably fix the check_inline_asm tests, but may break
the check_as tests.
Complicating the function calls is not the right way to go. The helper
function should take care of the required quoting and not rely on the
callers to pass arguments in nested quotes.
Ping; whoever is waiting for the other, please pick the thread up again.
Feel free to push this, I'll come up with a better fix later.

Diego

Loading...