Author: zhuqing
Date: 2011-11-24 04:37:49 -0500 (Thu, 24 Nov 2011)
New Revision: 3824

Modified:
   trunk/osprey/be/cg/x8664/cgtarget.cxx
Log:
Fix bug860. 

Code Review: Sun Chan


Modified: trunk/osprey/be/cg/x8664/cgtarget.cxx
===================================================================
--- trunk/osprey/be/cg/x8664/cgtarget.cxx       2011-11-23 08:42:18 UTC (rev 
3823)
+++ trunk/osprey/be/cg/x8664/cgtarget.cxx       2011-11-24 09:37:49 UTC (rev 
3824)
@@ -4121,6 +4121,15 @@
 
 TN* CGTARG_Gen_Dedicated_Subclass_TN( OP* op, int idx, BOOL is_result )
 {
+  // If idx is out of fixed number of operands or results, there is no 
+  // register set info in the targ_info for the op. In this case, return 
+  // tn if it is dedicated.
+  int opnd_result_cnt = is_result ? OP_fixed_results(op) : OP_fixed_opnds(op);
+  if (idx >= opnd_result_cnt) {
+    TN* tn = is_result ? OP_result( op, idx ) : OP_opnd( op, idx );
+    return TN_is_dedicated(tn) ? tn : NULL;
+  }
+
   const ISA_REGISTER_SUBCLASS subclass = is_result ?
     OP_result_reg_subclass( op, idx ) : OP_opnd_reg_subclass( op, idx );
   const REGISTER_SET subclass_regs = REGISTER_SUBCLASS_members(subclass);


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel

Reply via email to