pls go ahead checkin then
Thx!
Sun

On Wed, Sep 8, 2010 at 9:50 AM, Min Zhao <mzhao...@gmail.com> wrote:
> I searched in wgen. It seemed that the above place is the only place that
> needs to be changed.
> Also, I changed my assertion to include MTYPE_C16 and MTYPE_CQ, since they
> are possible complex types (in different target).
>
> Thanks,
>
> Min
>
> On Tue, Sep 7, 2010 at 4:31 PM, Sun Chan <sun.c...@gmail.com> wrote:
>>
>> may be you can grep for all occurences of "mtype == MTYPE_C4" in wgen
>> and see if there is still other places needed fixing.
>> Yes, since the C8, c10 are now first class citizens, mmiload is not
>> appropriate (only for user defined types)
>> Sun
>>
>> On Wed, Sep 8, 2010 at 7:25 AM, Min Zhao <mzhao...@gmail.com> wrote:
>> > Hi,
>> >
>> > Could a gatekeeper please review my fix for bug 593?
>> > https://bugs.open64.net/show_bug.cgi?id=593
>> > Here is the example for the failing case:
>> >
>> > 1. _Complex long double cd = 234.0L + 0x0.abcp-70L + 567.0Li
>> > +0x0defp-70Li;
>> >
>> > 2. void complexlongdouble_i_fv (int n, ...) {
>> >
>> > 3. __builtin_va_list ap;
>> >
>> > 4.__builtin_va_start (ap, n);
>> >
>> > 5. if (__builtin_va_arg (ap, _Complex long double) != cd)
>> >
>> > 6. abort ();
>> >
>> > 7.__builtin_va_end (ap); }
>> >
>> >
>> >
>> > The IR that wgen generated for the condition at line 5 is as:
>> >
>> >      U8LDA 0 <2,2,ap> T<69,anon_ptr.,8>
>> >
>> >     U8U8ILOAD 8 T<9,.predef_U8,8> T<67,anon_ptr.,8>
>> >
>> >    MMILOAD -32 T<23,.predef_C10,16> T<98,anon_ptr.,8>
>> >
>> >    C10C10LDID 0 <1,77,cd> T<23,.predef_C10,16>
>> >
>> >   I4C10NE
>> >
>> >
>> >
>> > This is not right. The correct IR should be like:
>> >      ...
>> >
>> >       U8U8LDID 0 <2,4,_temp_.va_arg5> T<98,anon_ptr.,8>
>> >
>> >    C10C10ILOAD 0 T<23,.predef_C10,16> T<98,anon_ptr.,8>
>> >
>> >    C10C10LDID 0 <1,77,cd> T<23,.predef_C10,16>
>> >
>> >   I4C10NE
>> >
>> > (where: _temp_.va_arg5 saves ap)
>> >
>> > The problem turns out that (in wgen_expr.cxx) the GS_VA_ARG_EXPR
>> > handling
>> > only considers MTYPE_C4, not MTYPE_C8 or MTYPE_C10. My fix is to include
>> > them.
>> >
>> >
>> > Thanks,
>> >
>> > Min
>> >
>> >
>> > Since my patch is simple, I just show it here, instead of attachment:
>> >
>> >
>> >
>> > Index: wgen_expr.cxx
>> >
>> > ===================================================================
>> >
>> > --- wgen_expr.cxx       (revision 3335)
>> >
>> > +++ wgen_expr.cxx       (working copy)
>> >
>> > @@ -9901,10 +9901,12 @@
>> >
>> >             wn = WN_CreateIload(OPR_ILOAD, Widen_Mtype (mtype), mtype,
>> > 0,
>> >
>> >                                 ty_idx, Make_Pointer_Type(ty_idx), wn);
>> >
>> >           }
>> >
>> > -         else if (mtype == MTYPE_C4) {
>> >
>> > -           wn = WGEN_x8664_va_arg(ap_wn, MTYPE_float(mtype), ty_idx,
>> > FALSE);
>> >
>> > -           wn = WN_CreateIload(OPR_ILOAD, MTYPE_C4, MTYPE_C4, 0,
>> > ty_idx,
>> >
>> > -                               Make_Pointer_Type(ty_idx), wn);
>> >
>> > +      else if (MTYPE_is_complex(mtype)) {
>> >
>> > +        Is_True((mtype == MTYPE_C4 || mtype == MTYPE_C8 || mtype ==
>> > MTYPE_C10),
>> >
>> > +            ("WGEN_Expand_Expr: unexpected complex type"));
>> >
>> > +        wn = WGEN_x8664_va_arg(ap_wn, MTYPE_float(mtype), ty_idx,
>> > FALSE);
>> >
>> > +        wn = WN_CreateIload(OPR_ILOAD, mtype, mtype, 0, ty_idx,
>> >
>> > +                Make_Pointer_Type(ty_idx), wn);
>> >
>> >           }
>> >
>> >           else {
>> >
>> >             enum X86_64_PARM_CLASS classes[MAX_CLASSES];
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > 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

Reply via email to