Author: zhuqing
Date: 2010-12-06 20:19:22 -0500 (Mon, 06 Dec 2010)
New Revision: 3425
Modified:
trunk/osprey/be/cg/x8664/expand.cxx
Log:
fix bug603.
1.support logical and, or, xor, negative, binary not operation for mmx vector
type
2.support logical and, or, xor for MTYPE_V8F4
Reviewed by Jianxin.
Modified: trunk/osprey/be/cg/x8664/expand.cxx
===================================================================
--- trunk/osprey/be/cg/x8664/expand.cxx 2010-12-07 00:10:31 UTC (rev 3424)
+++ trunk/osprey/be/cg/x8664/expand.cxx 2010-12-07 01:19:22 UTC (rev 3425)
@@ -1710,7 +1710,22 @@
}
} else if (!MTYPE_is_float(mtype)) {
- if( OP_NEED_PAIR(mtype) ){
+ if (MTYPE_is_mmx_vector(mtype)) {
+ TYPE_ID host_type;
+ if(mtype == MTYPE_M8I1) host_type = MTYPE_I1;
+ else if(mtype == MTYPE_M8I2) host_type = MTYPE_I2;
+ else if(mtype == MTYPE_M8I4) host_type = MTYPE_I4;
+ else host_type = MTYPE_I8;
+ TCON then = Host_To_Targ (host_type, 0x0);
+ TCON now = Create_Simd_Const (mtype, then);
+ ST *sym = New_Const_Sym (Enter_tcon (now), Be_Type_Tbl(TCON_ty(now)));
+ Allocate_Object(sym);
+ TN *sym_tn = Gen_Symbol_TN(sym, 0, 0);
+ TN *tmp = Build_TN_Like(result);
+ Exp_Load(mtype, mtype, tmp, TN_var(sym_tn), TN_offset(sym_tn), ops, 0);
+ Expand_Sub (result, tmp, src, mtype, ops);
+ }
+ else if( OP_NEED_PAIR(mtype) ){
Expand_Split_UOP( OPR_NEG, mtype, result, src, ops );
} else {
@@ -2275,7 +2290,10 @@
TN *sym_tn = Gen_Symbol_TN(sym, 0, 0);
TN *result_tn = Build_TN_Of_Mtype(mtype);
Exp_Load(mtype, mtype, result_tn, TN_var(sym_tn), TN_offset(sym_tn), ops,
0);
- Build_OP(TOP_xorps, dest, src, result_tn, ops);
+ if (MTYPE_is_mmx_vector(mtype))
+ Build_OP(TOP_pxor_mmx, dest, src, result_tn, ops);
+ else
+ Build_OP(TOP_xorps, dest, src, result_tn, ops);
} else {
if( OP_NEED_PAIR(mtype) )
Expand_Split_UOP( OPR_BNOT, mtype, dest, src, ops );
@@ -2343,12 +2361,19 @@
Build_OP(TOP_and128v32, dest, src1, src2, ops); break;
case MTYPE_V16I8:
Build_OP(TOP_and128v64, dest, src1, src2, ops); break;
+ case MTYPE_V8F4:
+ Build_OP(TOP_andps, dest, src1, src2, ops); break;
case MTYPE_V32F4:
case MTYPE_V16F4:
Build_OP(TOP_fand128v32, dest, src1, src2, ops); break;
case MTYPE_V32F8:
case MTYPE_V16F8:
Build_OP(TOP_fand128v64, dest, src1, src2, ops); break;
+ case MTYPE_M8I1:
+ case MTYPE_M8I2:
+ case MTYPE_M8I4:
+ case MTYPE_M8F4:
+ Build_OP(TOP_pand_mmx,dest, src1, src2, ops); break;
default:
if( OP_NEED_PAIR(mtype) ){
Expand_Split_BOP( OPR_BAND, mtype, dest, src1, src2, ops );
@@ -2399,6 +2424,13 @@
Build_OP(TOP_or128v32, dest, src1, src2, ops); break;
case MTYPE_V16I8:
Build_OP(TOP_or128v64, dest, src1, src2, ops); break;
+ case MTYPE_V8F4:
+ Build_OP(TOP_orps, dest, src1, src2, ops); break;
+ case MTYPE_M8I1:
+ case MTYPE_M8I2:
+ case MTYPE_M8I4:
+ case MTYPE_M8F4:
+ Build_OP(TOP_por_mmx,dest, src1, src2, ops); break;
default:
if( OP_NEED_PAIR(mtype) ){
Expand_Split_BOP( OPR_BIOR, mtype, dest, src1, src2, ops );
@@ -2449,6 +2481,13 @@
Build_OP(TOP_xor128v32, dest, src1, src2, ops); break;
case MTYPE_V16I8:
Build_OP(TOP_xor128v64, dest, src1, src2, ops); break;
+ case MTYPE_V8F4:
+ Build_OP(TOP_xorps, dest, src1, src2, ops); break;
+ case MTYPE_M8I1:
+ case MTYPE_M8I2:
+ case MTYPE_M8I4:
+ case MTYPE_M8F4:
+ Build_OP(TOP_pxor_mmx, dest, src1, src2, ops); break;
default:
if( OP_NEED_PAIR(mtype) ){
Expand_Split_BOP( OPR_BXOR, mtype, dest, src1, src2, ops );
------------------------------------------------------------------------------
What happens now with your Lotus Notes apps - do you make another costly
upgrade, or settle for being marooned without product support? Time to move
off Lotus Notes and onto the cloud with Force.com, apps are easier to build,
use, and manage than apps on traditional platforms. Sign up for the Lotus
Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d
_______________________________________________
Open64-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/open64-devel