This is the mail archive of the 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: PATCH: Add SSE4.1 testcases

Daniel Jacobowitz wrote:
> On Tue, May 22, 2007 at 04:09:31PM +0200, Uros Bizjak wrote:
>> On 5/22/07, Daniel Jacobowitz <> wrote:
>>> FYI, I have been coming to the opinion that the runtime feature tests
>>> in each test are a very bad idea.  They rely on signal handling; you
>>> can't test on a bare metal target that way, but if you use an
>>> effective target keyword then you can.
>> "runtime tests" in this context is a cpuid check at the start of the
>> test. If the target doesn't support requested feature, it simply
>> returns 0.
> OK, the situation for x86 is different than other platforms, then.  I
> don't think it matters which way we do it, although if there are going
> to be a lot of tests it would be nice to skip them if they're
> irrelevant.

I agree that it's not terribly important in practice, but, in theory at
least, one would like to completely skip tests that aren't relevant.
Having an SSE4 test "pass" on an i386 (because it checks that it's not
running on an SSE4 CPU, and then just exits with code zero) is
confusing; better for it just to be skipped.

So, I would suggest that we use a target-supports check to determine
both that the assembler support exists and that the CPU actually
supports the instruction, cache the results, and then require the
effective target in the tests.

Mark Mitchell
(650) 331-3385 x713

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