Author: yug
Date: 2012-02-15 03:40:23 -0500 (Wed, 15 Feb 2012)
New Revision: 3873

Modified:
   trunk/osprey/be/cg/x8664/ebo_special.cxx
Log:
fix for bug949.

When we do OP changes, we don't
miss the check for movext ops on a byte register.
If the byte register is not addressable under -m32,
We cancel this change.

Code Review: Sun Chan.


Modified: trunk/osprey/be/cg/x8664/ebo_special.cxx
===================================================================
--- trunk/osprey/be/cg/x8664/ebo_special.cxx    2012-02-15 08:38:39 UTC (rev 
3872)
+++ trunk/osprey/be/cg/x8664/ebo_special.cxx    2012-02-15 08:40:23 UTC (rev 
3873)
@@ -2728,6 +2728,30 @@
   if( new_op == NULL )
     return FALSE;
 
+  // open64.net bug949. When we do OP changes, we don't
+  // miss the check for movext ops on a byte register.
+  // If the byte register is not addressable under -m32,
+  // We cancel this change.
+
+  if ( Is_Target_32bit() &&
+       EBO_in_peep && 
+       TOP_is_move_ext( OP_code(new_op ))) {
+
+    const TOP check_top = OP_code(new_op);
+    if (check_top == TOP_movsbl ||
+        check_top == TOP_movzbl ||
+        check_top == TOP_movsbq ||
+        check_top == TOP_movzbq ) {
+      const REGISTER reg = TN_register(OP_opnd(new_op, 0));
+      const REGISTER_SET regs =
+        REGISTER_SUBCLASS_members(ISA_REGISTER_SUBCLASS_m32_8bit_regs);
+    
+    if( !REGISTER_SET_MemberP( regs, reg ) )
+      return FALSE;
+    }
+  }
+
+
   Set_OP_unrolling( new_op, OP_unrolling(op) );
   Set_OP_orig_idx( new_op, OP_map_idx(op) );
   Set_OP_unroll_bb( new_op, OP_unroll_bb(op) );


------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel

Reply via email to