]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
RISC-V: Enable builtin __riscv_mul with Zmmul extension.
authorTsung Chun Lin <tclin914@gmail.com>
Tue, 8 Oct 2024 23:44:38 +0000 (17:44 -0600)
committerJeff Law <jlaw@ventanamicro.com>
Tue, 8 Oct 2024 23:45:24 +0000 (17:45 -0600)
From d5b254e19d1f37fe27c7e98a0160e5c22446cfea Mon Sep 17 00:00:00 2001
From: Jim Lin <jim@andestech.com>
Date: Tue, 8 Oct 2024 13:14:32 +0800
Subject: [PATCH] RISC-V: Enable builtin __riscv_mul with Zmmul extension.

gcc/ChangeLog:

* config/riscv/riscv-c.cc: (riscv_cpu_cpp_builtins):
Enable builtin __riscv_mul with Zmmul extension.

gcc/config/riscv/riscv-c.cc

index 71112d9c66d769b4192db5877752617a2dc6af5c..7e9c478e97bbd58efc74d9264966531e20a3fce5 100644 (file)
@@ -123,7 +123,7 @@ riscv_cpu_cpp_builtins (cpp_reader *pfile)
   if (TARGET_ATOMIC)
     builtin_define ("__riscv_atomic");
 
-  if (TARGET_MUL)
+  if (TARGET_ZMMUL)
     builtin_define ("__riscv_mul");
   if (TARGET_DIV)
     builtin_define ("__riscv_div");