X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fia32%2Fia32_map_regs.h;h=78b5a23013e4364e70d4bd927804f8ed04523ae0;hb=5b7cbf3674f5de8d4e14200aa5a9f9919ba1c9de;hp=e32de6cee9b8ce7b7b86d60ad6f5930039e413b6;hpb=3b1a4ee674e9522acfd95b6d49c91f86f9b97d32;p=libfirm diff --git a/ir/be/ia32/ia32_map_regs.h b/ir/be/ia32/ia32_map_regs.h index e32de6cee..78b5a2301 100644 --- a/ir/be/ia32/ia32_map_regs.h +++ b/ir/be/ia32/ia32_map_regs.h @@ -1,24 +1,55 @@ -#ifndef _IA32_MAP_REGS_H_ -#define _IA32_MAP_REGS_H_ +/* + * Copyright (C) 1995-2008 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. + */ + +/** + * @file + * @brief Register param constraints and some other register handling tools. + * @author Christian Wuerdig + * @version $Id$ + */ +#ifndef FIRM_BE_IA32_IA32_MAP_REGS_H +#define FIRM_BE_IA32_IA32_MAP_REGS_H #include "irnode.h" +#include "irmode.h" #include "set.h" #include "../bearch.h" -#include "ia32_nodes_attr.h" - -int ia32_cmp_irn_reg_assoc(const void *a, const void *b, size_t len); -void ia32_set_firm_reg(ir_node *irn, const arch_register_t *reg, set *reg_set); -const arch_register_t *ia32_get_firm_reg(const ir_node *irn, set *reg_set); - -int ia32_cmp_reg_projnum_assoc(const void *a, const void *b, size_t len); -void ia32_set_reg_projnum(const arch_register_t *reg, long proj_num, set *reg_set); -long ia32_get_reg_projnum(const arch_register_t *reg, set *reg_set); - -int ia32_get_n_regparam_class(int n, ir_node **params, int *n_int, int *n_float); - -const ia32_register_req_t *ia32_get_RegParam_req(int n, ir_node **params, long nr, unsigned cc); - -long ia32_translate_proj_pos(const ir_node *proj); - -#endif /* _IA32_MAP_REGS_H_ */ +#include "bearch_ia32_t.h" +#include "gen_ia32_regalloc_if.h" + +/** + * Enters for each general purpose register the corresponding 16bit + * name into a pmap. + */ +void ia32_build_16bit_reg_map(pmap *reg_map); + +/** + * Enters for each general purpose register the corresponding 8bit + * name into a pmap. + */ +void ia32_build_8bit_reg_map(pmap *reg_map); +void ia32_build_8bit_reg_map_high(pmap *reg_map); + +/** + * Returns the corresponding mapped name for a register. + */ +const char *ia32_get_mapped_reg_name(pmap *reg_map, const arch_register_t *reg); + +#endif