Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
940f335a
Commit
940f335a
authored
17 years ago
by
Måns Rullgård
Browse files
Options
Downloads
Patches
Plain Diff
create and use check_asm() function
Originally committed as revision 10558 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
78eb6531
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
configure
+19
-44
19 additions, 44 deletions
configure
with
19 additions
and
44 deletions
configure
+
19
−
44
View file @
940f335a
...
...
@@ -410,6 +410,18 @@ check_cpp(){
check_cmd
$cc
$CFLAGS
"
$@
"
-E
-o
$TMPO
$TMPC
}
check_asm
(){
log check_asm
"
$@
"
name
=
"
$1
"
asm
=
"
$2
"
shift
2
check_cc
"
$@
"
<<
EOF
&& enable
$name
|| disable
$name
int foo(void){
asm volatile(
$asm
);
}
EOF
}
check_ld
(){
log check_ld
"
$@
"
check_cc
||
return
...
...
@@ -1414,18 +1426,10 @@ if enabled x86; then
EOF
# check wether EBX is available on x86
check_cc
<<
EOF
&& enable ebx_available
int main(){
asm volatile ("":::"%ebx");
}
EOF
check_asm ebx_available
'"":::"%ebx"'
# check whether binutils is new enough to compile SSSE3
enabled ssse3
&&
check_cc
<<
EOF
|| disable ssse3
int main(){
asm volatile ("pabsw %xmm0, %xmm0");
}
EOF
enabled ssse3
&&
check_asm ssse3
'"pabsw %xmm0, %xmm0"'
fi
# check for assembler specific support
...
...
@@ -1465,40 +1469,11 @@ int main(void) {
EOF
fi
# check armv5te instructions support
enabled armv5te
&&
check_cc
<<
EOF
|| disable armv5te
int main(void) {
__asm__ __volatile__ ("qadd r0, r0, r0");
}
EOF
enabled armv6
&&
check_cc
<<
EOF
|| disable armv6
int main(void) {
__asm__ __volatile__ ("sadd16 r0, r0, r0");
}
EOF
# check iwmmxt support
enabled iwmmxt
&&
check_cc
<<
EOF
|| disable iwmmxt
int main(void) {
__asm__ __volatile__ ("wunpckelub wr6, wr4");
}
EOF
# check if our compiler supports mmi
enabled mmi
&&
check_cc
<<
EOF
|| disable mmi
int main(void) {
__asm__ ("lq
\$
2, 0(
\$
2)");
return 0;
}
EOF
# check VIS support
enabled vis
&&
check_cc
-mcpu
=
ultrasparc
<<
EOF
|| disable vis
int main(void) {
__asm__ __volatile__ ("pdist %f0, %f0, %f0");
}
EOF
enabled armv5te
&&
check_asm armv5te
'"qadd r0, r0, r0"'
enabled armv6
&&
check_asm armv6
'"sadd16 r0, r0, r0"'
enabled iwmmxt
&&
check_asm iwmmxt
'"wunpckelub wr6, wr4"'
enabled mmi
&&
check_asm mmi
'"lq $2, 0($2)"'
enabled vis
&&
check_asm vis
'"pdist %f0, %f0, %f0"'
-mcpu
=
ultrasparc
enabled vis
&&
add_cflags
"-mcpu=ultrasparc -mtune=ultrasparc"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment