Very pleased to point out the problem, I'll modify them in the next check
in.
BTW, are there any reference for coding style?
Best wishes,
zhuqing
2010/9/1 Sun Chan <sun.c...@gmail.com>
> actually, the coding convention has always been that all tabs be
> replaced by spaces
> Sun
>
> On Wed, Sep 1, 2010 at 2:10 AM, Gautam Chakrabarti
> <gautam.c...@yahoo.com> wrote:
> > While we are at formatting, could you please indent statements under an
> IF
> > statement, like the Fail_FmtAssertion under the IF? It helps reading the
> > code. Also, it would help if you could consistently use tabs or spaces
> for
> > the CASE statements, currently the CASE statements may look differently
> > indented (depending on the setting of tabs). I personally prefer spaces
> to
> > tabs (although this preference varies a lot between persons).
> >
> > Thanks,
> > Gautam
> > ________________________________
> > From: Sun Chan <sun.c...@gmail.com>
> > To: open64-devel@lists.sourceforge.net
> > Sent: Tue, August 31, 2010 11:07:41 PM
> > Subject: Re: [Open64-devel] r3332 - trunk/osprey/wgen
> >
> > This sounds a bit too trivial. OTOH, I had problem with people not
> > putting one space after the "//" as comment.
> > This happens almost always with China trained engrs.
> > Please add that space. It helps to keep formats consistent and a bit
> > more easy reading
> > Sun
> >
> > On Tue, Aug 31, 2010 at 10:55 PM, <s...@open64.net> wrote:
> >> Author: zhuqing
> >> Date: 2010-09-01 01:55:28 -0400 (Wed, 01 Sep 2010)
> >> New Revision: 3332
> >>
> >> Modified:
> >> trunk/osprey/wgen/wgen_expr.cxx
> >> Log:
> >> add intrinsic for _mm_extract_pi16
> >>
> >> Modified: trunk/osprey/wgen/wgen_expr.cxx
> >> ===================================================================
> >> --- trunk/osprey/wgen/wgen_expr.cxx 2010-09-01 05:42:02 UTC (rev
> 3331)
> >> +++ trunk/osprey/wgen/wgen_expr.cxx 2010-09-01 05:55:28 UTC (rev
> 3332)
> >> @@ -3967,7 +3967,29 @@
> >> case GSBI_IX86_BUILTIN_VEC_EXT_V4SI:
> >> *iopc = INTRN_VEC_EXT_V2SI;
> >> break;
> >> - case GSBI_IX86_BUILTIN_VEC_EXT_V2DI:
> >> + 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:
> >> + *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:
> >> *iopc = INTRN_VEC_EXT_V2SI;
> >> break;
> >> case GSBI_IX86_BUILTIN_VEC_EXT_V2DF:
> >> @@ -9294,7 +9316,18 @@
> >> for (i = 0, list = gs_tree_operand (exp, 1);
> >> list;
> >> i++, list = gs_tree_chain (list)) {
> >> - arg_wn = WGEN_Expand_Expr (gs_tree_value (list));
> >> + //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;
> >> + }
> >> + arg_wn = WGEN_Expand_Expr (gs_tree_value (list));
> >> +
> >> #ifdef KEY // bug 11286
> >> if (i == 1 && TARGET_64BIT &&
> >> (gs_decl_function_code(func) == GSBI_BUILT_IN_POWI ||
> >>
> >>
> >>
> >>
> ------------------------------------------------------------------------------
> >> 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
> >>
> >
> >
> ------------------------------------------------------------------------------
> > 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
> >
> >
> >
> ------------------------------------------------------------------------------
> > 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
> >
> >
>
>
> ------------------------------------------------------------------------------
> 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
>
------------------------------------------------------------------------------
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