aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/target-riscv.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-riscv.c')
-rw-r--r--target-riscv.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/target-riscv.c b/target-riscv.c
index 217ab7e8..7a184973 100644
--- a/target-riscv.c
+++ b/target-riscv.c
@@ -19,6 +19,8 @@
#define RISCV_GENERIC (RISCV_MUL|RISCV_DIV|RISCV_ATOMIC|RISCV_FPU)
#define RISCV_ZICSR (1 << 10)
#define RISCV_ZIFENCEI (1 << 11)
+#define RISCV_ZICBOM (1 << 12)
+#define RISCV_ZIHINTPAUSE (1 << 13)
static unsigned int riscv_flags;
@@ -41,6 +43,8 @@ static void parse_march_riscv(const char *arg)
{ "c", RISCV_COMP },
{ "_zicsr", RISCV_ZICSR },
{ "_zifencei", RISCV_ZIFENCEI },
+ { "_zicbom", RISCV_ZICBOM },
+ { "_zihintpause", RISCV_ZIHINTPAUSE },
};
int i;
@@ -131,6 +135,10 @@ static void predefine_riscv(const struct target *self)
predefine("__riscv_zicsr", 1, "1");
if (riscv_flags & RISCV_ZIFENCEI)
predefine("__riscv_zifencei", 1, "1");
+ if (riscv_flags & RISCV_ZICBOM)
+ predefine("__riscv_zicbom", 1, "1");
+ if (riscv_flags & RISCV_ZIHINTPAUSE)
+ predefine("__riscv_zihintpause", 1, "1");
if (cmodel)
predefine_strong("__riscv_cmodel_%s", cmodel);