aboutsummaryrefslogtreecommitdiff
path: root/tcg/riscv/tcg-target-con-str.h
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2020-10-16 19:12:36 -0700
committerRichard Henderson <richard.henderson@linaro.org>2021-02-02 12:12:31 -1000
commitfc63a4c5c8c32b887e9c0cedb68efe94e701815d (patch)
treeca068c29d8b1691e1698f4635a92f32d75d23d50 /tcg/riscv/tcg-target-con-str.h
parent51800e434679a88bff8b48f62e55ab14642d223e (diff)
tcg/riscv: Split out target constraints to tcg-target-con-str.h
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tcg/riscv/tcg-target-con-str.h')
-rw-r--r--tcg/riscv/tcg-target-con-str.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/tcg/riscv/tcg-target-con-str.h b/tcg/riscv/tcg-target-con-str.h
new file mode 100644
index 0000000000..8d8afaee53
--- /dev/null
+++ b/tcg/riscv/tcg-target-con-str.h
@@ -0,0 +1,21 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Define RISC-V target-specific operand constraints.
+ * Copyright (c) 2021 Linaro
+ */
+
+/*
+ * Define constraint letters for register sets:
+ * REGS(letter, register_mask)
+ */
+REGS('r', ALL_GENERAL_REGS)
+REGS('L', ALL_GENERAL_REGS & ~SOFTMMU_RESERVE_REGS)
+
+/*
+ * Define constraint letters for constants:
+ * CONST(letter, TCG_CT_CONST_* bit set)
+ */
+CONST('I', TCG_CT_CONST_S12)
+CONST('N', TCG_CT_CONST_N12)
+CONST('M', TCG_CT_CONST_M12)
+CONST('Z', TCG_CT_CONST_ZERO)