summaryrefslogtreecommitdiffhomepage
path: root/ir/be/betranshlp.h
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/betranshlp.h
parenta4c2839c9c204f3784a753b74cb1d6141a7f5b43 (diff)
be: Add and use 'be_mode_needs_gp_reg()'.
Diffstat (limited to 'ir/be/betranshlp.h')
-rw-r--r--ir/be/betranshlp.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/ir/be/betranshlp.h b/ir/be/betranshlp.h
index 04ce3af..e2bbbde 100644
--- a/ir/be/betranshlp.h
+++ b/ir/be/betranshlp.h
@@ -177,4 +177,12 @@ bool be_match_immediate(ir_node const *node, ir_tarval **tarval_out,
ir_node *be_make_Sync(ir_node *block, int arity, ir_node **ins);
+/**
+ * Returns true if mode should be stored in a general purpose register
+ */
+static inline bool be_mode_needs_gp_reg(ir_mode *const mode)
+{
+ return get_mode_arithmetic(mode) == irma_twos_complement;
+}
+
#endif