Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions c_check
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,13 @@ if (($architecture eq "mips") || ($architecture eq "mips64")) {
if ($@){
warn "could not load PERL module File::Temp, so could not check MSA capatibility";
} else {
$tmpf = new File::Temp( UNLINK => 1 );
$tmpf = new File::Temp( SUFFIX => '.c' , UNLINK => 1 );
$code = '"addvi.b $w0, $w1, 1"';
$msa_flags = "-mmsa -mfp64 -msched-weight -mload-store-pairs";
print $tmpf "#include <msa.h>\n\n";
print $tmpf "void main(void){ __asm__ volatile($code); }\n";

$args = "$msa_flags -o $tmpf.o -x c $tmpf";
$args = "$msa_flags -o $tmpf.o $tmpf";
my @cmd = ("$compiler_name $args");
system(@cmd) == 0;
if ($? != 0) {
Expand Down Expand Up @@ -229,10 +229,13 @@ if (($architecture eq "x86") || ($architecture eq "x86_64")) {
$no_avx512 = 0;
} else {
# $tmpf = new File::Temp( UNLINK => 1 );
($fh,$tmpf) = tempfile( UNLINK => 1 );
($fh,$tmpf) = tempfile( SUFFIX => '.c' , UNLINK => 1 );
$code = '"vbroadcastss -4 * 4(%rsi), %zmm2"';
print $tmpf "#include <immintrin.h>\n\nint main(void){ __asm__ volatile($code); }\n";
$args = " -march=skylake-avx512 -c -o $tmpf.o -x c $tmpf";
$args = " -march=skylake-avx512 -c -o $tmpf.o $tmpf";
if ($compiler eq "PGI") {
$args = " -tp skylake -c -o $tmpf.o $tmpf";
}
my @cmd = ("$compiler_name $args >/dev/null 2>/dev/null");
system(@cmd) == 0;
if ($? != 0) {
Expand Down Expand Up @@ -318,6 +321,7 @@ $linker_a = "";
&& ($flags !~ /kernel32/)
&& ($flags !~ /advapi32/)
&& ($flags !~ /shell32/)
&& ($flags !~ /omp/)
) {
$linker_l .= $flags . " "
}
Expand Down
1 change: 1 addition & 0 deletions f_check
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ if ($link ne "") {
&& ($flags !~ /kernel32/)
&& ($flags !~ /advapi32/)
&& ($flags !~ /shell32/)
&& ($flags !~ /omp/)
&& ($flags !~ /^\-l$/)
) {
$linker_l .= $flags . " ";
Expand Down
4 changes: 4 additions & 0 deletions utest/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ OBJS += test_fork.o
endif
endif

ifeq ($(C_COMPILER), PGI)
OBJS = utest_main2.o
endif

all : run_test

$(UTESTBIN): $(OBJS)
Expand Down