This changes in wgen_expr.cxx caused a regression on IA-64. There will be an
assertion during CG expansion phase:
### Compiler Error in file case1.cxx (user routine 'main') during
Code_Expansion phase:
### Unimplemented function Expand_Expr: MLOAD/MSTORE
I'd like to only apply this piece of code on X8664. Any suggestions?
2011/3/1 <s...@open64.net>
> Author: aagarwa
> Date: 2011-03-01 06:16:59 -0500 (Tue, 01 Mar 2011)
> New Revision: 3499
>
> Modified:
> trunk/osprey/be/com/wn_lower.cxx
> trunk/osprey/wgen/wgen_expr.cxx
> Log:
> The copy the -1 preg to a temp area is not done when for GS_CALL_EXPR
> and the Passed is GS_ADDR_EXPR with operand as GS_VAR_DECL.The MTYPE_M
> is not supported. Added the changes for that.
>
>
> Modified: trunk/osprey/be/com/wn_lower.cxx
> ===================================================================
> --- trunk/osprey/be/com/wn_lower.cxx 2011-03-01 05:54:57 UTC (rev 3498)
> +++ trunk/osprey/be/com/wn_lower.cxx 2011-03-01 11:16:59 UTC (rev 3499)
> @@ -4855,8 +4855,11 @@
> #endif // TARG_X8664 || VECTOR_MTYPES
>
> case MTYPE_M:
> - Fail_FmtAssertion ("MLDID of Return_Val_Preg not allowed in middle"
> - " of expression");
> + WN_st_idx(tree) = ST_st_idx(MTYPE_To_PREG(MTYPE_U8));
> + WN_load_offset(tree) = First_Int_Preg_Return_Offset;
> + WN_set_rtype(tree, MTYPE_U8);
> + WN_set_desc(tree, MTYPE_U8);
> + return tree;
> /*NOTREACHED*/
> default:
> Fail_FmtAssertion ("Unexpected type in lower_return_ldid");
> @@ -11391,7 +11394,7 @@
> : parm;
>
> ploc = Get_Output_Parameter_Location(TY_Of_Parameter(parm));
> - if (MTYPE_is_m(parmType))
> + if (MTYPE_is_m(parmType)&&(WN_operator(actual) != OPR_LDID))
> {
> /*
> * structure parameter
>
> Modified: trunk/osprey/wgen/wgen_expr.cxx
> ===================================================================
> --- trunk/osprey/wgen/wgen_expr.cxx 2011-03-01 05:54:57 UTC (rev 3498)
> +++ trunk/osprey/wgen/wgen_expr.cxx 2011-03-01 11:16:59 UTC (rev 3499)
> @@ -7893,6 +7893,7 @@
> case GS_AGGR_INIT_EXPR:
> case GS_CALL_EXPR:
> {
> + BOOL is_gs_addr_arg = FALSE;
> gs_t arglist = gs_tree_operand (exp, 1);
> TYPE_ID ret_mtype;
> WN *call_wn;
> @@ -9834,11 +9835,24 @@
> TY_mtype(TY_pointed(ty_idx)) == MTYPE_V) /* pointer to void */
> ty_idx = nop_ty_idx;
> #endif
> + if((ret_mtype == MTYPE_M) && (Is_Target_64bit()))
> + {
> + for (list = gs_tree_operand (exp, 1); list;
> + list = gs_tree_chain (list)) {
> + if(gs_tree_code(gs_tree_value (list)) == GS_ADDR_EXPR)
> + {
> + if (gs_tree_code(
> + gs_tree_operand(gs_tree_value (list),0)) ==
> GS_VAR_DECL )
> + is_gs_addr_arg = TRUE;
> + }
> + }
> + }
> wn1 = WN_Ldid (ret_mtype, -1, Return_Val_Preg, ty_idx);
>
> - if (ret_mtype == MTYPE_M) { // copy the -1 preg to a temp area
> + if (ret_mtype == MTYPE_M && (!is_gs_addr_arg)) { // copy the -1
> preg to a temp area
>
> TY_IDX ret_ty_idx = ty_idx;
> + is_gs_addr_arg = FALSE;
> #ifndef KEY
> // bug 3735: the compiler cannot arbitrarily change the alignment of
> // individual structures
>
>
>
> ------------------------------------------------------------------------------
> Free Software Download: Index, Search & Analyze Logs and other IT data in
> Real-Time with Splunk. Collect, index and harness all the fast moving IT
> data
> generated by your applications, servers and devices whether physical,
> virtual
> or in the cloud. Deliver compliance at lower cost and gain new business
> insights. http://p.sf.net/sfu/splunk-dev2dev
> _______________________________________________
> Open64-devel mailing list
> Open64-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/open64-devel
>
--
Regards,
Lai Jian-Xin
------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel