Author: zhuqing
Date: 2010-09-02 03:03:59 -0400 (Thu, 02 Sep 2010)
New Revision: 3334

Modified:
   trunk/osprey/wgen/wgen_expr.cxx
Log:
add target constraint for _mm_extract_pi16, fix bug602

Modified: trunk/osprey/wgen/wgen_expr.cxx
===================================================================
--- trunk/osprey/wgen/wgen_expr.cxx     2010-09-01 06:28:49 UTC (rev 3333)
+++ trunk/osprey/wgen/wgen_expr.cxx     2010-09-02 07:03:59 UTC (rev 3334)
@@ -3970,26 +3970,25 @@
     case GSBI_IX86_BUILTIN_VEC_EXT_V4HI:
       // add intrinsic for _mm_extract_pi16
       if (WN_operator(arg1) != OPR_INTCONST)
-      Fail_FmtAssertion ("selector must be an integer constant in the range 
0..3");
-     switch (WN_const_val(arg1)){
-     case 0:
-       *iopc = INTRN_PEXTRW0;
-       break;
-     case 1:
+        Fail_FmtAssertion ("selector must be an integer constant in the range 
0..3");
+      switch (WN_const_val(arg1)){
+      case 0:
+        *iopc = INTRN_PEXTRW0;
+        break;
+      case 1:
         *iopc = INTRN_PEXTRW1;
-       break;
-     case 2:
-       *iopc = INTRN_PEXTRW2;
-       break;
-     case 3:
-       *iopc = INTRN_PEXTRW3;
-       break;
-     default:
-       Fail_FmtAssertion ("selector must be an integer constant in the range 
0..3" );
-       }
-     break;
- 
-   case GSBI_IX86_BUILTIN_VEC_EXT_V2DI:
+        break;
+      case 2:
+        *iopc = INTRN_PEXTRW2;
+        break;
+      case 3:
+        *iopc = INTRN_PEXTRW3;
+        break;
+      default:
+        Fail_FmtAssertion ("selector must be an integer constant in the range 
0..3" );
+      }
+      break;
+    case GSBI_IX86_BUILTIN_VEC_EXT_V2DI:
       *iopc = INTRN_VEC_EXT_V2SI;
       break;
     case GSBI_IX86_BUILTIN_VEC_EXT_V2DF:
@@ -9319,13 +9318,15 @@
              // if intrinsic equals _mm_extract_pi16, 
              // the second param is fixed to const 0,1,2,3, so 
              // there is no need to generate the second arg node.
-             if (i ==1 && (iopc == INTRN_PEXTRW0 ||
-                           iopc == INTRN_PEXTRW1 ||
-                           iopc == INTRN_PEXTRW2 ||
-                           iopc == INTRN_PEXTRW3)) {
-               num_args = 1;
-               break;
-             }  
+#ifdef TARG_X8664
+              if (i ==1 && (iopc == INTRN_PEXTRW0 ||
+                            iopc == INTRN_PEXTRW1 ||
+                            iopc == INTRN_PEXTRW2 ||
+                            iopc == INTRN_PEXTRW3)) {
+                num_args = 1;
+                break;
+             }
+#endif
               arg_wn = WGEN_Expand_Expr (gs_tree_value (list));
              
 #ifdef KEY // bug 11286


------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel

Reply via email to