be_abi_put_ignore_regs returns now number of ignore registers as unsigned
[libfirm] / ir / be / ia32 / ia32_map_regs.c
index 4468222..765ce9f 100644 (file)
@@ -1,8 +1,27 @@
+/*
+ * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
+ *
+ * This file is part of libFirm.
+ *
+ * This file may be distributed and/or modified under the terms of the
+ * GNU General Public License version 2 as published by the Free Software
+ * Foundation and appearing in the file LICENSE.GPL included in the
+ * packaging of this file.
+ *
+ * Licensees holding valid libFirm Professional Edition licenses may use
+ * this file in accordance with the libFirm Commercial License.
+ * Agreement provided with the Software.
+ *
+ * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ */
+
 /**
- * Register mapping for firm nodes. Stolen from bearch_firm :)
- * Calculate requirements for register parameter.
- * @author Christian Wuerdig
- * $Id$
+ * @file
+ * @brief       Register param constraints and some other register handling tools.
+ * @author      Christian Wuerdig
+ * @version     $Id$
  */
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -226,45 +245,3 @@ const arch_register_t *ia32_get_RegParam_reg(int n, ir_mode **modes, long nr, un
 
        return param_reg;
 }
-
-
-
-/**
- * Translates the projnum into a "real" argument position for register
- * requirements dependend on the predecessor.
- */
-long ia32_translate_proj_pos(const ir_node *proj) {
-       ir_node *pred = get_Proj_pred(proj);
-       long nr       = get_Proj_proj(proj);
-
-       if (is_ia32_Ld(pred)) {
-               if (nr == pn_Load_res || nr == 0)
-                       return 0;
-               assert(0 && "unsupported Proj(Load) number");
-       }
-       else if (is_ia32_Cdq(pred) || is_ia32_MulS(pred) || is_ia32_Mulh(pred)) {
-               if (nr == pn_EAX)
-                       return 0;
-               if (nr == pn_EDX)
-                       return 1;
-       }
-       else if (is_ia32_DivMod(pred)) {
-               if (nr == pn_DivMod_res_div)
-                       return 0;
-               if (nr == pn_DivMod_res_mod)
-                       return 1;
-               assert(0 && "unsupported DivMod");
-       }
-       else if (get_irn_opcode(pred) == iro_Start) {
-               return nr;
-       }
-       else if (is_ia32_CopyB(pred) || is_ia32_CopyB_i(pred)) {
-               return nr;
-       }
-       else if (is_ia32_Leave(pred)) {
-               return nr;
-       }
-
-//     assert(0 && "unsupported Proj(X)");
-       return 0;
-}