Commit 6f1a6c5b by Richard Henderson Committed by Richard Henderson

mmintrin.h: New file.

        * config/i386/mmintrin.h: New file.
        * config/i386/xmmintrin.h: New file.
        * config.gcc (i?86-*-*): Add extra_headers.
        * simplify-rtx.c (simplify_unary_operation): Handle saturating
        truncation codes.
        (simplify_binary_operation): Handle saturating arithmetic codes.
        * config/i386/i386.c (ix86_expand_sse_comi): Return the full result,
        not the lowpart subreg.
        (ix86_expand_builtin): Return a TImode dummy register instead of 0
        on error.
        * config/i386/i386.md (mmx_clrdi): Override memory attribute.

        * gcc.dg/i386-mmx-1.c, gcc.dg/i386-mmx-2.c: New.
        * gcc.dg/i386-sse-1.c, gcc.dg/i386-sse-2.c, gcc.dg/i386-sse-1.c: New.
CVs: ----------------------------------------------------------------------

From-SVN: r48793
parent cdb574d3
2002-01-11 Richard Henderson <rth@redhat.com>
* config/i386/mmintrin.h: New file.
* config/i386/xmmintrin.h: New file.
* config.gcc (i?86-*-*): Add extra_headers.
* simplify-rtx.c (simplify_unary_operation): Handle saturating
truncation codes.
(simplify_binary_operation): Handle saturating arithmetic codes.
* config/i386/i386.c (ix86_expand_sse_comi): Return the full result,
not the lowpart subreg.
(ix86_expand_builtin): Return a TImode dummy register instead of 0
on error.
* config/i386/i386.md (mmx_clrdi): Override memory attribute.
2002-01-12 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
* conflict.c (conflict_graph_compute): Free regsets when finished.
......
......@@ -231,6 +231,7 @@ c*-convex-*)
;;
i[34567]86-*-*)
cpu_type=i386
extra_headers="mmintrin.h xmmintrin.h"
;;
x86_64-*-*)
cpu_type=i386
......
......@@ -11546,7 +11546,7 @@ ix86_expand_sse_comi (d, arglist, target)
gen_rtx_REG (CCmode, FLAGS_REG),
const0_rtx)));
return target;
return SUBREG_REG (target);
}
/* Expand an expression EXP that calls a built-in function,
......@@ -11612,7 +11612,7 @@ ix86_expand_builtin (exp, target, subtarget, mode, ignore)
{
/* @@@ better error message */
error ("selector must be an immediate");
return const0_rtx;
return gen_reg_rtx (tmode);
}
if (target == 0
|| GET_MODE (target) != tmode
......@@ -11813,7 +11813,7 @@ ix86_expand_builtin (exp, target, subtarget, mode, ignore)
{
/* @@@ better error message */
error ("mask must be an immediate");
return const0_rtx;
return gen_reg_rtx (tmode);
}
if (target == 0
|| GET_MODE (target) != tmode
......
......@@ -18947,7 +18947,8 @@
(unspec:DI [(const_int 0)] 45))]
"TARGET_MMX"
"pxor\t{%0, %0|%0, %0}"
[(set_attr "type" "mmx")])
[(set_attr "type" "mmx")
(set_attr "memory" "none")])
(define_insn "mmx_anddi3"
[(set (match_operand:DI 0 "register_operand" "=y")
......
......@@ -572,6 +572,8 @@ simplify_unary_operation (code, mode, op, op_mode)
case SQRT:
case FLOAT_EXTEND:
case FLOAT_TRUNCATE:
case SS_TRUNCATE:
case US_TRUNCATE:
return 0;
default:
......@@ -1524,6 +1526,13 @@ simplify_binary_operation (code, mode, op0, op1)
return op0;
break;
case SS_PLUS:
case US_PLUS:
case SS_MINUS:
case US_MINUS:
/* ??? There are simplifications that can be done. */
return 0;
default:
abort ();
}
......
2002-01-11 Richard Henderson <rth@redhat.com>
* gcc.dg/i386-mmx-1.c, gcc.dg/i386-mmx-2.c: New.
* gcc.dg/i386-sse-1.c, gcc.dg/i386-sse-2.c, gcc.dg/i386-sse-1.c: New.
Fri Jan 11 12:13:30 2002 Nicola Pero <n.pero@mi.flashnet.it>
* objc.dg/special/unclaimed-category-1.m: Include objc/objc-api.h.
......
/* { dg-do compile { target i?86-*-* } } */
/* { dg-options "-O2 -mmmx" } */
/* Test that the intrinsics compile with optimization. All of them are
defined as inline functions in mmintrin.h that reference the proper
builtin functions. Defining away "static" and "__inline" results in
all of them being compiled as proper functions. */
#define static
#define __inline
#include <mmintrin.h>
/* { dg-do compile { target i?86-*-* } } */
/* { dg-options "-O0 -mmmx" } */
/* Test that the intrinsics compile without optimization. All of them are
defined as inline functions in mmintrin.h that reference the proper
builtin functions. Defining away "static" and "__inline" results in
all of them being compiled as proper functions. */
#define static
#define __inline
#include <mmintrin.h>
/* { dg-do compile { target i?86-*-* } } */
/* { dg-options "-O2 -msse" } */
/* Test that the intrinsics compile with optimization. All of them are
defined as inline functions in mmintrin.h that reference the proper
builtin functions. Defining away "static" and "__inline" results in
all of them being compiled as proper functions. */
#define static
#define __inline
#include <xmmintrin.h>
/* { dg-do compile { target i?86-*-* } } */
/* { dg-options "-O0 -msse" } */
/* Test that the intrinsics compile without optimization. All of them are
defined as inline functions in mmintrin.h that reference the proper
builtin functions. Defining away "static" and "__inline" results in
all of them being compiled as proper functions. */
#define static
#define __inline
#include <xmmintrin.h>
/* { dg-do compile { target i?86-*-* } } */
/* { dg-options "-O2 -msse" } */
/* Test that the intrinsics compile with optimization. These were not
tested in i386-sse-[12].c because these builtins require immediate
operands. */
#include <xmmintrin.h>
__m128
test_shuf (void)
{
__m128 a = _mm_set1_ps (1.0);
__m128 b = _mm_set1_ps (2.0);
return _mm_shuffle_ps (a, b, _MM_SHUFFLE (0,1,2,3));
}
__m64
test_ins_ext (__m64 a)
{
return _mm_insert_pi16 (a, _mm_extract_pi16 (a, 0), 3);
}
__m64
test_shuf2 (__m64 a)
{
return _mm_shuffle_pi16 (a, 0xA5);
}
void
test_prefetch (char *p)
{
_mm_prefetch (p, _MM_HINT_T0);
_mm_prefetch (p+4, _MM_HINT_T1);
_mm_prefetch (p+8, _MM_HINT_T2);
_mm_prefetch (p+12, _MM_HINT_NTA);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment