This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [doc, testsuite, libgfortran] Avoid use of SSE/SSE2/SSE3 on Solaris 8/9 x86


Uros Bizjak <ubizjak@gmail.com> writes:

> I don't think we need separate check_sse_runtime and
> check_sse2_runtime. There are no separate sse and sse2 registers (they
> are called xmm registers). FYI, mmx regs are aliased to x87 register
> stack and are not affected by this problem.

Ok, fine.

> So, I propose to
>
> a) Add only check_sse_os_support_available check
> b) Search for all vect.exp files and add this check together with
> check_sse2_hw_available to fix vect testsuites
> c) Introduce new check_effective_target_sse2_runtime. Put
> check_sse2_hw_available and check_sse_os_support_available into this
> function (in a similar way as vect.exp does).
> c1) Eventually, introduce check_effective_target_sse_runtime and
> corresponding sse_hw_available.

Sounds reasonable so far.

> d) You can then remove all homegrown runtime checks for SSE from the testcases.

What do you mean with `homegrown runtime checks' here?  I suppose all
the `manual' invocations of __get_cpuid() outside of gcc.target/i386?
That would work nicely: the existing dg-require-effective-target
sse*_runtime tests could be left in place and the tests would magically
work without the testcase having to do the check itself.  That's even
better than converting them to use sse*-check.h, which would have to be
located from outside of gcc.target/i386.

> I would also prefer to unify solaris check in i386.md IMO, it is

I suppose you mean sol2-check.h (ILL_INSN and ILL_INSN_LEN) here?

> enough to check "movss %xmm2, %xmm1" for all SSE levels. This would
> remove complications with ILL_INSN, since it will always be the same
> and thus part of sol2-check.

Right.  Perhaps we should rename sol2-check.h to sse-os-support.h and
sol2_check() to sse_os_support() at this point to match the dg procs?
There's nothing Solaris-specific left in the interface, and if ever
another OS comes along with a similar problem, only the header needs to
be augmented.

> BTW: I think you will need to change all *-check.h checks (minus
> MMX/3dNOW! ones) to prevent tests from touching xmm regs.

For complete correctness, you're certainly right.  On the other hand,
Solaris 8 and 9 won't run on very recent processors, so I've only
changed those *-check.h tests that exhibited execution failures.  I can
of course change all the *-check.h checks for generality if you prefer.

Thanks.
	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]