aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/target-s390.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-s390.c')
-rw-r--r--target-s390.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/target-s390.c b/target-s390.c
index 8fe7d936..9dbc810e 100644
--- a/target-s390.c
+++ b/target-s390.c
@@ -1,6 +1,7 @@
#include "symbol.h"
#include "target.h"
#include "machine.h"
+#include "expression.h"
static void predefine_s390(const struct target *self)
@@ -8,6 +9,16 @@ static void predefine_s390(const struct target *self)
predefine("__s390__", 1, "1");
}
+static const char *asm_constraint_s390(struct asm_operand *op, int c, const char *str)
+{
+ switch (c) {
+ case 'R': case 'S': case 'T':
+ op->is_memory = true;
+ break;
+ }
+ return str;
+}
+
const struct target target_s390 = {
.mach = MACH_S390,
.bitness = ARCH_LP32,
@@ -21,6 +32,7 @@ const struct target target_s390 = {
.target_64bit = &target_s390x,
.predefine = predefine_s390,
+ .asm_constraint = asm_constraint_s390,
};
@@ -45,4 +57,5 @@ const struct target target_s390x = {
.target_32bit = &target_s390,
.predefine = predefine_s390x,
+ .asm_constraint = asm_constraint_s390,
};