[PATCH]: Add -msse2 to test vector for x86 and add 32byte vector tests
H.J. Lu
hjl.tools@gmail.com
Thu Jun 12 22:40:00 GMT 2008
On Thu, Jun 12, 2008 at 12:35 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
> On Thu, Jun 12, 2008 at 1:05 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>
>> In 32bit, by default, SSE2 may not be enabled. Without SSE2, we aren't
>> really testing SSE vector ABI. This patch adds -msse2 for x86. I also
>> include 32byte vector tests. I added them, assuming those tests
>> will only be used for gcc 3.5 or newer.
>
> Please note that this is a runtime test, and using SSE2 insns without
> runtime check for required target feature will fail at runtime. OTOH,
> generic vectors will "just work" even without -msse2 on x86_32 and we
> will still exercise SSE vector ABI on x86_64, where -msse2 is the
> default.
>
> Uros.
>
Here is an updated patch. We should also test SSE ABI for 32bit.
I added dg-do and dg-skip-if support to compat.exp. I also enable
gcc.dg/compat/union-m128-1_main.c for ia32. OK for trunk?
Thanks.
--
H.J.
---
2008-06-12 H.J. Lu <hongjiu.lu@intel.com>
* gcc.dg/compat/struct-layout-1_generate.c (vector_types): Add
v32qi, v16hi, v8si, v4di, v8sf, v4df, u32qi, u16hi, u8si, u4di,
u8sf and u4df.
* gcc.dg/compat/union-m128-1_main.c: Run only on x86. Remove
__x86_64__ check. Include "cpuid.h".
(main): Check SSE2 at runtime.
* gcc.dg/compat/union-m128-1_x.c: Compile with -msse2. Remove
__x86_64__ check.
* gcc.dg/compat/union-m128-1_y.c: Likewise.
* gcc.dg/compat/vector-1_x.c: Add 32byte vector tests.
* gcc.dg/compat/vector-1_y.c: Likewise.
* gcc.dg/compat/vector-2_x.c: Skip x86. Add 32byte vector tests.
* gcc.dg/compat/vector-2_y.c: Likewise.
* gcc.dg/compat/vector-1_main.c: Skip x86.
* gcc.dg/compat/vector-2_main.c: Likewise.
* gcc.dg/compat/vector-1a_main.c: New.
* gcc.dg/compat/vector-1a_x.c: Likewise.
* gcc.dg/compat/vector-1a_y.c: Likewise.
* gcc.dg/compat/vector-2a_main.c: Likewise.
* gcc.dg/compat/vector-2a_x.c: Likewise.
* gcc.dg/compat/vector-2a_y.c: Likewise.
* gcc.dg/compat/vector-defs.h (v32qi): New.
(v16hi): Likewise.
(v8si): Likewise.
(v4di): Likewise.
(v8sf): Likewise.
(v4df): Likewise.
(u32qi): Likewise.
(u16hi): Likewise.
(u8si): Likewise.
(u4di): Likewise.
(u8sf): Likewise.
(u4df): Likewise.
* lib/compat.exp (compat-get-options-main): Support dg-do
and dg-skip-if.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-compat-1.patch
Type: application/octet-stream
Size: 13375 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080612/1ec67e20/attachment.obj>
More information about the Gcc-patches
mailing list