Author: shihui Date: 2010-08-26 00:50:03 -0400 (Thu, 26 Aug 2010) New Revision: 3321
Modified: trunk/osprey/be/cg/whirl2ops.cxx Log: fix _mm_slli_si128(v, imm), convert bit offset to byte offset in cg Modified: trunk/osprey/be/cg/whirl2ops.cxx =================================================================== --- trunk/osprey/be/cg/whirl2ops.cxx 2010-08-25 02:12:27 UTC (rev 3320) +++ trunk/osprey/be/cg/whirl2ops.cxx 2010-08-26 04:50:03 UTC (rev 3321) @@ -3784,6 +3784,24 @@ *kidno = 2; return Gen_Literal_TN (WN_const_val (WN_kid0 (WN_kid2 (expr))), 4); + + case INTRN_PSLLDQ: + case INTRN_PSRLDQ: +#ifdef Is_True_On + { + const char * intrn_name = INTRN_c_name (id); + Is_True (WN_kid_count (expr) == 2, + ("Handle_Imm_Op: Invalid # of kids of %s intrn", intrn_name)); + Is_True (WN_operator (WN_kid0 (WN_kid1 (expr))) == OPR_INTCONST, + ("Handle_Imm_Op: Arg 2 of %s intrn must be immediate constant", + intrn_name)); + Is_True (WN_const_val (WN_kid0 (WN_kid1 (expr))) %8 == 0, + ("offset is bit size must be byte based\n")); + } +#endif + *kidno = 1; + return Gen_Literal_TN (WN_const_val (WN_kid0 (WN_kid1 (expr)))/8, 4); + case INTRN_PSLLWI: case INTRN_PSLLDI: case INTRN_PSLLQI: @@ -3792,8 +3810,6 @@ case INTRN_PSRLQI: case INTRN_PSRAWI: case INTRN_PSRADI: - case INTRN_PSLLDQ: - case INTRN_PSRLDQ: case INTRN_PSLLWI128: case INTRN_PSLLDI128: case INTRN_PSLLQI128: ------------------------------------------------------------------------------ Sell apps to millions through the Intel(R) Atom(Tm) Developer Program Be part of this innovative community and reach millions of netbook users worldwide. Take advantage of special opportunities to increase revenue and speed time-to-market. Join now, and jumpstart your future. http://p.sf.net/sfu/intel-atom-d2d _______________________________________________ Open64-devel mailing list Open64-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open64-devel