X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Farm%2Farm_new_nodes.h;h=a2c494441fa47205709ebe50b637464036fe2b76;hb=75ee2fcd7c5bfb5ff2c680b7086cf796fa9ff66a;hp=a1ef249bad9f5faf8c0aad7e96312b79a9fe0fb1;hpb=5da0fab6d0c10e01c19ecf6fdc3cc83d982dc8a5;p=libfirm diff --git a/ir/be/arm/arm_new_nodes.h b/ir/be/arm/arm_new_nodes.h index a1ef249ba..a2c494441 100644 --- a/ir/be/arm/arm_new_nodes.h +++ b/ir/be/arm/arm_new_nodes.h @@ -1,10 +1,30 @@ -#ifndef _ARM_NEW_NODES_H_ -#define _ARM_NEW_NODES_H_ - -/** - * Function prototypes for the assembler ir node constructors. - * $Id$ - */ +/* + * 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 Function prototypes for the assembler ir node constructors. + * @author Oliver Richter, Tobias Gneist + * @version $Id$ + */ +#ifndef FIRM_BE_ARM_ARM_NEW_NODES_H +#define FIRM_BE_ARM_ARM_NEW_NODES_H #include "arm_nodes_attr.h" #include "bearch_arm_t.h" @@ -21,44 +41,63 @@ ***************************************************************************************************/ /** - * Returns the attributes of an arm node. + * Returns the attributes of a generic Arm node. + */ +arm_attr_t *get_arm_attr(ir_node *node); +const arm_attr_t *get_arm_attr_const(const ir_node *node); + +/** + * Returns the attributes of an ARM SymConst node. + */ +arm_SymConst_attr_t *get_arm_SymConst_attr(ir_node *node); +const arm_SymConst_attr_t *get_arm_SymConst_attr_const(const ir_node *node); + +/** + * Returns the attributes of an ARM CondJmp node. + */ +arm_CondJmp_attr_t *get_arm_CondJmp_attr(ir_node *node); +const arm_CondJmp_attr_t *get_arm_CondJmp_attr_const(const ir_node *node); + +/** + * Returns the attributes of an ARM SwitchJmp node. */ -arm_attr_t *get_arm_attr(const ir_node *node); +arm_SwitchJmp_attr_t *get_arm_SwitchJmp_attr(ir_node *node); +const arm_SwitchJmp_attr_t *get_arm_SwitchJmp_attr_const(const ir_node *node); /** * Returns the argument register requirements of an arm node. */ -const arm_register_req_t **get_arm_in_req_all(const ir_node *node); +const arch_register_req_t **get_arm_in_req_all(const ir_node *node); /** * Returns the result register requirements of an arm node. */ -const arm_register_req_t **get_arm_out_req_all(const ir_node *node); +const arch_register_req_t **get_arm_out_req_all(const ir_node *node); /** * Returns the argument register requirements of an arm node. */ -const arm_register_req_t *get_arm_in_req(const ir_node *node, int pos); +const arch_register_req_t *get_arm_in_req(const ir_node *node, int pos); /** * Returns the result register requirements of an arm node. */ -const arm_register_req_t *get_arm_out_req(const ir_node *node, int pos); +const arch_register_req_t *get_arm_out_req(const ir_node *node, int pos); /** * Sets the OUT register requirements at position pos. */ -void set_arm_req_out(ir_node *node, const arm_register_req_t *req, int pos); +void set_arm_req_out(ir_node *node, const arch_register_req_t *req, int pos); /** * Sets the complete OUT requirements of node. */ -void set_arm_req_out_all(ir_node *node, const arm_register_req_t **reqs); +void set_arm_req_out_all(ir_node *node, const arch_register_req_t **reqs); /** * Sets the IN register requirements at position pos. */ -void set_arm_req_in(ir_node *node, const arm_register_req_t *req, int pos); +void set_arm_req_in(ir_node *node, const arch_register_req_t *req, int pos); /** * Returns the register flag of an arm node. @@ -68,7 +107,7 @@ arch_irn_flags_t get_arm_flags(const ir_node *node); /** * Sets the register flag of an arm node. */ -void set_arm_flags(const ir_node *node, arch_irn_flags_t flags); +void set_arm_flags(ir_node *node, arch_irn_flags_t flags); /** * Returns the result register slots of an arm node. @@ -91,81 +130,87 @@ int get_arm_out_regnr(const ir_node *node, int pos); const arch_register_t *get_arm_out_reg(const ir_node *node, int pos); /** - * Sets the number of results. + * Returns the number of results. */ -void set_arm_n_res(ir_node *node, int n_res); +int get_arm_n_res(const ir_node *node); /** - * Returns the number of results. + * Sets the flags for the n'th out. */ -int get_arm_n_res(const ir_node *node); +void set_arm_out_flags(ir_node *node, arch_irn_flags_t flags, int pos); /** - * Set the ARM machine node attributes to default values. + * Gets the flags for the n'th out. */ -void init_arm_attributes(ir_node *node, int flags, const arm_register_req_t ** in_reqs, - const arm_register_req_t ** out_reqs, int n_res); +arch_irn_flags_t get_arm_out_flags(const ir_node *node, int pos); -ir_node *arm_new_NoReg_gp(arm_code_gen_t *cg); -ir_node *arm_new_NoReg_fp(arm_code_gen_t *cg); +/** + * Returns the immediate value + */ +long get_arm_imm_value(const ir_node *node); /** - * Returns the tarval + * Sets the immediate value */ -tarval *get_arm_value(const ir_node *node); +void set_arm_imm_value(ir_node *node, long imm_value); + +/** +* Return the tarval of a fpaConst +*/ +tarval *get_fpaConst_value(const ir_node *node); /** - * Sets the tarval + * Sets the tarval of a fpaConst */ -void set_arm_value(ir_node *node, tarval *tv); +void set_fpaConst_value(ir_node *node, tarval *tv); /** * Returns the proj num */ -int get_arm_proj_num(const ir_node *node); +int get_arm_CondJmp_proj_num(const ir_node *node); /** * Sets the proj num */ -void set_arm_proj_num(ir_node *node, int proj_num); +void set_arm_CondJmp_proj_num(ir_node *node, int proj_num); -const char *get_arm_symconst_label(ir_node *node); -void set_arm_symconst_label(ir_node *node, const char *symconst_label); +ident *get_arm_symconst_id(const ir_node *node); +void set_arm_symconst_id(ir_node *node, ident *symconst_id); ir_node *new_r_arm_StoreStackMInc(ir_graph *irg, ir_node *block, ir_node *mem, ir_node *sp, int n_regs, ir_node **regs, ir_mode *mode); /** - * Returns the number of projs. + * Returns the number of projs of a SwitchJmp. */ -int get_arm_n_projs(ir_node *node); +int get_arm_SwitchJmp_n_projs(const ir_node *node); /** - * Sets the number of projs. + * Sets the number of projs of a SwitchJmp. */ -void set_arm_n_projs(ir_node *node, int n_projs); +void set_arm_SwitchJmp_n_projs(ir_node *node, int n_projs); /** * Returns the default_proj_num. */ -long get_arm_default_proj_num(ir_node *node); +long get_arm_SwitchJmp_default_proj_num(const ir_node *node); /** * Sets the default_proj_num. */ -void set_arm_default_proj_num(ir_node *node, long default_proj_num); +void set_arm_SwitchJmp_default_proj_num(ir_node *node, long default_proj_num); /** * Gets the shift modifier attribute. */ -arm_shift_modifier get_arm_shift_modifier(ir_node *node); +arm_shift_modifier get_arm_shift_modifier(const ir_node *node); /** * Decode an immediate with shifter operand */ -unsigned int arm_decode_imm_w_shift(tarval *tv); +unsigned int arm_decode_imm_w_shift(long imm_value); /* Include the generated headers */ #include "gen_arm_new_nodes.h" -#endif /* _ARM_NEW_NODES_H_ */ +#endif