Author: zhuqing
Date: 2012-01-19 03:38:15 -0500 (Thu, 19 Jan 2012)
New Revision: 3860

Modified:
   trunk/osprey/be/cg/lra.cxx
Log:
Fix bug943.

Code Review: Jian-xin.


Modified: trunk/osprey/be/cg/lra.cxx
===================================================================
--- trunk/osprey/be/cg/lra.cxx  2012-01-18 10:12:40 UTC (rev 3859)
+++ trunk/osprey/be/cg/lra.cxx  2012-01-19 08:38:15 UTC (rev 3860)
@@ -5518,14 +5518,6 @@
     Set_OP_opnd( op, opnd_idx, result );
 
   } else {
-    if (TN_size(result) > 2)
-      Exp_COPY( opnd, result, &ops );
-    else
-    // Do sign/zero extend instead of regular copy.  Needed for "sete" which
-    // doesn't clear the upper bits.  Bug 5621.
-      Exp_COPY_Ext(TN_size(result) == 2 ? TOP_movzwl : TOP_movzbl,
-                   opnd, result, &ops );
-    
     // For inline asm, when opnd is both input and output, it needs to
     // insert a mov from opnd to the new generate "result" to make sure
     // asm output and input still use the same TN.
@@ -5537,6 +5529,7 @@
  
     // Insert mov before asm
     if (OP_code(op) == TOP_asm) {
+      Exp_COPY( opnd, result, &ops );
       for( int i = 0; i < OP_opnds( op ); i++ ){
         TN * operand = OP_opnd( op, i );
         if ( operand == opnd ) {
@@ -5548,6 +5541,12 @@
         }
       }
     }
+    else {
+      // Do sign/zero extend instead of regular copy.  Needed for "sete" which
+      // doesn't clear the upper bits.  Bug 5621.
+      Exp_COPY_Ext(TN_size(result) == 2 ? TOP_movzwl : TOP_movzbl,
+                   opnd, result, &ops );
+    }
 
     // Insert mov after asm
     OP_srcpos(OPS_last(&ops)) = OP_srcpos(op);


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel

Reply via email to