On Tue, Dec 13, 2016 at 11:42:40AM +0100, Jakub Jelinek wrote: > On Tue, Dec 13, 2016 at 11:18:31AM +0100, Dominik Vogt wrote: > > > IMHO you want something like x86 avx_runtime effective target > > > (z13_runtime?), which would stand for running on z13 capable hw and > > > with z13 assembler support. > > > > Something like that, yes, but it's not so easy because the kernel > > has to support it too. Some features are disabled in a VM > > although the hardware supports them. What we really need is > > The z13_runtime or whatever effective target routine can always > just try to compile/link a simple testcase with at least one z13 specific > instruction and try to run it. > > > Run test if the test system (not just the hardware) supports the > > instruction set of the -march= option the test was compiled > > with, otherwise just compile it. > > > > I.e. derive the "effective_targt..." option from the "-march=..." > > option set by the torture test. > > > > > Or choose what options to include based on such effective target tests, > > > and perhaps also select a default action, like we do on some targets e.g. > > > in > > > the vectorizer. > > > > Can you give an example test file, please? > > Look e.g. at gcc.dg/vect/vect.exp and testsuite/lib/*.exp for > dg-do-what-default and the games done with it. E.g. if you set > (and saved/restored) in addition to dg-do-what-default also EFFECTIVE_TARGETS > then perhaps you could use et-dg-runtest or similar.
Thanks. New patch with different approach here: https://gcc.gnu.org/ml/gcc-patches/2016-12/msg01621.html Ciao Dominik ^_^ ^_^ -- Dominik Vogt IBM Germany