summaryrefslogtreecommitdiffhomepage
path: root/ir/be/beasm.h
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2019-03-03 16:55:19 +0100
committerChristoph Mallon <christoph.mallon@gmx.de>2019-03-04 20:55:18 +0100
commitaeb9a50904e8864cef8e7f783f5bda705a792c37 (patch)
treebf627443164c57170e9d97b411969d73589aa30c /ir/be/beasm.h
parent60d49bf6351f543e33f122c6d60567486a054051 (diff)
beasm: Add helper function to check for occurrence of modifiers.
Diffstat (limited to 'ir/be/beasm.h')
-rw-r--r--ir/be/beasm.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/ir/be/beasm.h b/ir/be/beasm.h
index b0c7bce..2af6154 100644
--- a/ir/be/beasm.h
+++ b/ir/be/beasm.h
@@ -123,4 +123,9 @@ struct be_register_name_t {
arch_register_t const *be_parse_register_name(char const *clobber);
+static inline bool be_has_modifier(char const* const candidates, char const modifier)
+{
+ return modifier != '\0' && strchr(candidates, modifier);
+}
+
#endif