summaryrefslogtreecommitdiffhomepage
path: root/ir/be/TEMPLATE
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2016-09-18 17:02:53 +0200
committerChristoph Mallon <christoph.mallon@gmx.de>2016-09-18 22:49:58 +0200
commit9efd8c48a59864ceccaf96587f5992080111cbf3 (patch)
tree7a03f0db08adce723ae3fb1a4f63c2e2eefeb42a /ir/be/TEMPLATE
parenta4c2839c9c204f3784a753b74cb1d6141a7f5b43 (diff)
be: Add and use 'be_mode_needs_gp_reg()'.
Diffstat (limited to 'ir/be/TEMPLATE')
-rw-r--r--ir/be/TEMPLATE/TEMPLATE_transform.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/ir/be/TEMPLATE/TEMPLATE_transform.c b/ir/be/TEMPLATE/TEMPLATE_transform.c
index 04eab6c..a1dd240 100644
--- a/ir/be/TEMPLATE/TEMPLATE_transform.c
+++ b/ir/be/TEMPLATE/TEMPLATE_transform.c
@@ -33,14 +33,6 @@ DEBUG_ONLY(static firm_dbg_module_t *dbg = NULL;)
typedef ir_node* (*new_binop_func)(dbg_info *dbgi, ir_node *block,
ir_node *left, ir_node *right);
-/**
- * returns true if mode should be stored in a general purpose register
- */
-static inline bool mode_needs_gp_reg(ir_mode *mode)
-{
- return get_mode_arithmetic(mode) == irma_twos_complement;
-}
-
static ir_node *transform_const(ir_node *const node, ir_entity *const entity, ir_tarval *const value)
{
ir_node *const block = be_transform_nodes_block(node);
@@ -271,7 +263,7 @@ static ir_node *gen_Phi(ir_node *node)
{
ir_mode *mode = get_irn_mode(node);
const arch_register_req_t *req;
- if (mode_needs_gp_reg(mode)) {
+ if (be_mode_needs_gp_reg(mode)) {
req = TEMPLATE_reg_classes[CLASS_TEMPLATE_gp].class_req;
} else {
req = arch_memory_req;