annotate gcc/testsuite/lib/brig.exp @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 1830386684a0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
1 # Copyright (C) 2009-2020 Free Software Foundation, Inc.
111
kono
parents:
diff changeset
2
kono
parents:
diff changeset
3 # This program is free software; you can redistribute it and/or modify
kono
parents:
diff changeset
4 # it under the terms of the GNU General Public License as published by
kono
parents:
diff changeset
5 # the Free Software Foundation; either version 3 of the License, or
kono
parents:
diff changeset
6 # (at your option) any later version.
kono
parents:
diff changeset
7 #
kono
parents:
diff changeset
8 # This program is distributed in the hope that it will be useful,
kono
parents:
diff changeset
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
kono
parents:
diff changeset
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
kono
parents:
diff changeset
11 # GNU General Public License for more details.
kono
parents:
diff changeset
12 #
kono
parents:
diff changeset
13 # You should have received a copy of the GNU General Public License
kono
parents:
diff changeset
14 # along with GCC; see the file COPYING3. If not see
kono
parents:
diff changeset
15 # <http://www.gnu.org/licenses/>.
kono
parents:
diff changeset
16
kono
parents:
diff changeset
17 load_lib prune.exp
kono
parents:
diff changeset
18 load_lib gcc-defs.exp
kono
parents:
diff changeset
19 load_lib timeout.exp
kono
parents:
diff changeset
20 load_lib target-libpath.exp
kono
parents:
diff changeset
21 #
kono
parents:
diff changeset
22 # brig_target_compile -- compile a HSAIL input to BRIG using HSAILasm and then
kono
parents:
diff changeset
23 # compile the BRIG to target ISA using gcc
kono
parents:
diff changeset
24
kono
parents:
diff changeset
25 proc brig_target_compile { source dest type options } {
kono
parents:
diff changeset
26 global tmpdir
kono
parents:
diff changeset
27 global testname_with_flags
kono
parents:
diff changeset
28 if { [file extension $source] == ".hsail" } {
kono
parents:
diff changeset
29 # We cannot assume all inputs are .hsail as the dg machinery
kono
parents:
diff changeset
30 # calls this for a some c files to check linker plugin support or
kono
parents:
diff changeset
31 # similar.
kono
parents:
diff changeset
32 set brig_source ${tmpdir}/[file tail ${source}].brig
kono
parents:
diff changeset
33 exec HSAILasm $source -o ${brig_source}
kono
parents:
diff changeset
34 set source ${brig_source}
kono
parents:
diff changeset
35 # Change the testname the .brig.
kono
parents:
diff changeset
36 set testname_with_flags [file tail $source]
kono
parents:
diff changeset
37 }
kono
parents:
diff changeset
38 return [target_compile $source $dest $type $options]
kono
parents:
diff changeset
39 }
kono
parents:
diff changeset
40