aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/target-riscv.c
diff options
Diffstat (limited to 'target-riscv.c')
-rw-r--r--target-riscv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/target-riscv.c b/target-riscv.c
index dd25bfb9..3bba7c15 100644
--- a/target-riscv.c
+++ b/target-riscv.c
@@ -17,6 +17,7 @@
#define RISCV_FPU (RISCV_FLOAT|RISCV_DOUBLE|RISCV_FDIV)
#define RISCV_GENERIC (RISCV_MUL|RISCV_DIV|RISCV_ATOMIC|RISCV_FPU)
#define RISCV_ZICSR (1 << 10)
+#define RISCV_ZIFENCEI (1 << 11)
static unsigned int riscv_flags;
@@ -49,6 +50,7 @@ static void parse_march_riscv(const char *arg)
{ "h", 0 },
{ "s", 0 },
{ "_zicsr", RISCV_ZICSR },
+ { "_zifencei", RISCV_ZIFENCEI },
};
int i;
@@ -131,6 +133,8 @@ static void predefine_riscv(const struct target *self)
predefine("__riscv_muldiv", 1, "1");
if (riscv_flags & RISCV_ZICSR)
predefine("__riscv_zicsr", 1, "1");
+ if (riscv_flags & RISCV_ZIFENCEI)
+ predefine("__riscv_zifencei", 1, "1");
if (cmodel)
predefine_strong("__riscv_cmodel_%s", cmodel);