Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
1b82a065
Commit
1b82a065
authored
Jan 13, 2009
by
Nathan Froyd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add missing target-supports.exp commit
From-SVN: r143326
parent
44c4becf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
0 deletions
+59
-0
gcc/testsuite/lib/target-supports.exp
+59
-0
No files found.
gcc/testsuite/lib/target-supports.exp
View file @
1b82a065
...
...
@@ -905,6 +905,65 @@ proc check_vmx_hw_available { } {
}]
}
# Return 1 if the target supports executing 64-bit instructions, 0
# otherwise. Cache the result.
proc check_effective_target_powerpc64 { } {
global powerpc64_available_saved
global tool
if [info exists powerpc64_available_saved] {
verbose "check_effective_target_powerpc64 returning saved $powerpc64_available_saved" 2
} else {
set powerpc64_available_saved 0
# Some simulators are known to not support powerpc64 instructions.
if { [istarget powerpc-*-eabi*] || [istarget powerpc-ibm-aix*] } {
verbose "check_effective_target_powerpc64 returning 0" 2
return $powerpc64_available_saved
}
# Set up, compile, and execute a test program containing a 64-bit
# instruction. Include the current process ID in the file
# names to prevent conflicts with invocations for multiple
# testsuites.
set src ppc[pid].c
set exe ppc[pid].x
set f [open $src "w"]
puts $f "int main() {"
puts $f "#ifdef __MACH__"
puts $f " asm volatile (\"extsw r0,r0\");"
puts $f "#else"
puts $f " asm volatile (\"extsw 0,0\");"
puts $f "#endif"
puts $f " return 0; }"
close $f
set opts "additional_flags=-mcpu=G5"
verbose "check_effective_target_powerpc64 compiling testfile $src" 2
set lines [${tool}_target_compile $src $exe executable "$opts"]
file delete $src
if [string match "" $lines] then {
# No error message, compilation succeeded.
set result [${tool}_load "./$exe" "" ""]
set status [lindex $result 0]
remote_file build delete $exe
verbose "check_effective_target_powerpc64 testfile status is <$status>" 2
if { $status == "pass" } then {
set powerpc64_available_saved 1
}
} else {
verbose "check_effective_target_powerpc64 testfile compilation failed" 2
}
}
return $powerpc64_available_saved
}
# GCC 3.4.0 for powerpc64-*-linux* included an ABI fix for passing
# complex float arguments. This affects gfortran tests that call cabsf
# in libm built by an earlier compiler. Return 1 if libm uses the same
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment