Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

Commit

Permalink
rvp: update to spec 0.9.11
Browse files Browse the repository at this point in the history
0. update impl according to the change in 0.9.11
1. fix add/sub crash in rv32g
2. use standard name for saturation insn, e.g. kaddw and kaddh
  • Loading branch information
linsinan1995 committed Apr 28, 2022
1 parent 418ddbd commit 7eeadf6
Show file tree
Hide file tree
Showing 6 changed files with 177 additions and 206 deletions.
114 changes: 58 additions & 56 deletions gcc/config/riscv/riscv-builtins-rvp.def
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ DIRECT_BUILTIN_NO_PREFIX (kaddv2hi3, kadd16, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN, z
DIRECT_BUILTIN_NO_PREFIX (kaddv2hi3, v_kadd16, RISCV_V2HI_FTYPE_V2HI_V2HI, zpn32),
DIRECT_BUILTIN_NO_PREFIX (kaddv4hi3, kadd16, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kaddv4hi3, v64_kadd16, RISCV_V4HI_FTYPE_V4HI_V4HI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kaddh, kaddh, RISCV_SI_FTYPE_SI_SI, zpn),
DIRECT_BUILTIN_NO_PREFIX (ssaddhi3, kaddh, RISCV_HI_FTYPE_HI_HI, zpn),
DIRECT_BUILTIN_NO_PREFIX (kcrasv2hi, kcras16, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN, zpn32),
DIRECT_BUILTIN_NO_PREFIX (kcrasv2hi, v_kcras16, RISCV_V2HI_FTYPE_V2HI_V2HI, zpn32),
DIRECT_BUILTIN_NO_PREFIX (kcras16_64, kcras16, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
Expand Down Expand Up @@ -297,8 +297,8 @@ DIRECT_BUILTIN_NO_PREFIX (ksubv2hi3, ksub16, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN, z
DIRECT_BUILTIN_NO_PREFIX (ksubv2hi3, v_ksub16, RISCV_V2HI_FTYPE_V2HI_V2HI, zpn32),
DIRECT_BUILTIN_NO_PREFIX (ksubv4hi3, ksub16, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (ksubv4hi3, v64_ksub16, RISCV_V4HI_FTYPE_V4HI_V4HI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (ksubh, ksubh, RISCV_SI_FTYPE_SI_SI, zpn),
DIRECT_BUILTIN_NO_PREFIX (ksubw, ksubw, RISCV_SI_FTYPE_SI_SI, zpn),
DIRECT_BUILTIN_NO_PREFIX (sssubhi3, ksubh, RISCV_HI_FTYPE_HI_HI, zpn),
DIRECT_BUILTIN_NO_PREFIX (sssubsi3, ksubw, RISCV_SI_FTYPE_SI_SI, zpn),
DIRECT_BUILTIN_NO_PREFIX (kwmmul, kwmmul, RISCV_IXLEN_FTYPE_IXLEN_IXLEN, zpn32),
DIRECT_BUILTIN_NO_PREFIX (kwmmul_round, kwmmul_u, RISCV_IXLEN_FTYPE_IXLEN_IXLEN, zpn32),
DIRECT_BUILTIN_NO_PREFIX (kwmmul_64, kwmmul, RISCV_IXLEN_FTYPE_IXLEN_IXLEN, zpn64),
Expand Down Expand Up @@ -589,9 +589,9 @@ DIRECT_BUILTIN_NO_PREFIX (ukaddv2hi3, ukadd16, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN,
DIRECT_BUILTIN_NO_PREFIX (ukaddv2hi3, v_ukadd16, RISCV_UV2HI_FTYPE_UV2HI_UV2HI, zpn32),
DIRECT_BUILTIN_NO_PREFIX (ukaddv4hi3, ukadd16, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (ukaddv4hi3, v64_ukadd16, RISCV_UV4HI_FTYPE_UV4HI_UV4HI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (ukaddh, ukaddh, RISCV_USI_FTYPE_USI_USI, zpn),
DIRECT_BUILTIN_NO_PREFIX (ukaddw, ukaddw, RISCV_USI_FTYPE_USI_USI, zpn),
DIRECT_BUILTIN_NO_PREFIX (kaddw, kaddw, RISCV_SI_FTYPE_SI_SI, zpn),
DIRECT_BUILTIN_NO_PREFIX (usaddhi3, ukaddh, RISCV_UHI_FTYPE_UHI_UHI, zpn),
DIRECT_BUILTIN_NO_PREFIX (usaddsi3, ukaddw, RISCV_USI_FTYPE_USI_USI, zpn),
DIRECT_BUILTIN_NO_PREFIX (ssaddsi3, kaddw, RISCV_SI_FTYPE_SI_SI, zpn),
DIRECT_BUILTIN_NO_PREFIX (ukcrasv2hi, ukcras16, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN, zpn32),
DIRECT_BUILTIN_NO_PREFIX (ukcrasv2hi, v_ukcras16, RISCV_UV2HI_FTYPE_UV2HI_UV2HI, zpn32),
DIRECT_BUILTIN_NO_PREFIX (ukcras16_64, ukcras16, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
Expand All @@ -616,8 +616,8 @@ DIRECT_BUILTIN_NO_PREFIX (uksubv2hi3, uksub16, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN,
DIRECT_BUILTIN_NO_PREFIX (uksubv2hi3, v_uksub16, RISCV_UV2HI_FTYPE_UV2HI_UV2HI, zpn32),
DIRECT_BUILTIN_NO_PREFIX (uksubv4hi3, uksub16, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (uksubv4hi3, v64_uksub16, RISCV_UV4HI_FTYPE_UV4HI_UV4HI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (uksubh, uksubh, RISCV_USI_FTYPE_USI_USI, zpn),
DIRECT_BUILTIN_NO_PREFIX (uksubw, uksubw, RISCV_USI_FTYPE_USI_USI, zpn),
DIRECT_BUILTIN_NO_PREFIX (ussubhi3, uksubh, RISCV_UHI_FTYPE_UHI_UHI, zpn),
DIRECT_BUILTIN_NO_PREFIX (ussubsi3, uksubw, RISCV_USI_FTYPE_USI_USI, zpn),
DIRECT_BUILTIN_NO_PREFIX (umaqa, umaqa, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN_UIXLEN, zpn32),
DIRECT_BUILTIN_NO_PREFIX (umaqa, v_umaqa, RISCV_USI_FTYPE_USI_UV4QI_UV4QI, zpn32),
DIRECT_BUILTIN_NO_PREFIX (umaqa64, umaqa, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN_UIXLEN, zpn64),
Expand Down Expand Up @@ -701,20 +701,20 @@ DIRECT_BUILTIN_NO_PREFIX (crasv2si, v_scras32, RISCV_V2SI_FTYPE_V2SI_V2SI, zpn64
DIRECT_BUILTIN_NO_PREFIX (crsav2si, crsa32, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (crsav2si, v_ucrsa32, RISCV_UV2SI_FTYPE_UV2SI_UV2SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (crsav2si, v_scrsa32, RISCV_V2SI_FTYPE_V2SI_V2SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kabsv2si2, kabs32, RISCV_UIXLEN_FTYPE_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kabsv2si2, kabs32, RISCV_DI_FTYPE_DI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kabsv2si2, v_kabs32, RISCV_V2SI_FTYPE_V2SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kaddv2si3, kadd32, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kaddv2si3, kadd32, RISCV_IXLEN_FTYPE_IXLEN_IXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kaddv2si3, v_kadd32, RISCV_V2SI_FTYPE_V2SI_V2SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kcrasv2si, kcras32, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kcrasv2si, kcras32, RISCV_IXLEN_FTYPE_IXLEN_IXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kcrasv2si, v_kcras32, RISCV_V2SI_FTYPE_V2SI_V2SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kcrsav2si, kcrsa32, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kcrsav2si, kcrsa32, RISCV_IXLEN_FTYPE_IXLEN_IXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kcrsav2si, v_kcrsa32, RISCV_V2SI_FTYPE_V2SI_V2SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (khmbb16, khmbb16, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (khmbt16, khmbt16, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (khmtt16, khmtt16, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kdmbb16, kdmbb16, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kdmbt16, kdmbt16, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kdmtt16, kdmtt16, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (khmbb16, khmbb16, RISCV_IXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (khmbt16, khmbt16, RISCV_IXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (khmtt16, khmtt16, RISCV_IXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kdmbb16, kdmbb16, RISCV_IXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kdmbt16, kdmbt16, RISCV_IXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kdmtt16, kdmtt16, RISCV_IXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kdmabb16, kdmabb16, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kdmabt16, kdmabt16, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kdmatt16, kdmatt16, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN_UIXLEN, zpn64),
Expand All @@ -727,39 +727,39 @@ DIRECT_BUILTIN_NO_PREFIX (kdmtt16, v_kdmtt16, RISCV_V2SI_FTYPE_V4HI_V4HI, zpn64)
DIRECT_BUILTIN_NO_PREFIX (kdmabb16, v_kdmabb16, RISCV_V2SI_FTYPE_V2SI_V4HI_V4HI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kdmabt16, v_kdmabt16, RISCV_V2SI_FTYPE_V2SI_V4HI_V4HI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kdmatt16, v_kdmatt16, RISCV_V2SI_FTYPE_V2SI_V4HI_V4HI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kmabb32, kmabb32, RISCV_IXLEN_FTYPE_IXLEN_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kmabt32, kmabt32, RISCV_IXLEN_FTYPE_IXLEN_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kmatt32, kmatt32, RISCV_IXLEN_FTYPE_IXLEN_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kmabb32, kmabb32, RISCV_IXLEN_FTYPE_IXLEN_IXLEN_IXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kmabt32, kmabt32, RISCV_IXLEN_FTYPE_IXLEN_IXLEN_IXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kmatt32, kmatt32, RISCV_IXLEN_FTYPE_IXLEN_IXLEN_IXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kmabb32, v_kmabb32, RISCV_IXLEN_FTYPE_IXLEN_V2SI_V2SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kmabt32, v_kmabt32, RISCV_IXLEN_FTYPE_IXLEN_V2SI_V2SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kmatt32, v_kmatt32, RISCV_IXLEN_FTYPE_IXLEN_V2SI_V2SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kmaxda32, kmaxda32, RISCV_IXLEN_FTYPE_IXLEN_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kmaxda32, kmaxda32, RISCV_IXLEN_FTYPE_IXLEN_IXLEN_IXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kmaxda32, v_kmaxda32, RISCV_IXLEN_FTYPE_IXLEN_V2SI_V2SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kmda32, kmda32, RISCV_IXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kmxda32, kmxda32, RISCV_IXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kmda32, kmda32, RISCV_IXLEN_FTYPE_IXLEN_IXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kmxda32, kmxda32, RISCV_IXLEN_FTYPE_IXLEN_IXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kmda32, v_kmda32, RISCV_IXLEN_FTYPE_V2SI_V2SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kmxda32, v_kmxda32, RISCV_IXLEN_FTYPE_V2SI_V2SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kmads32, kmads32, RISCV_IXLEN_FTYPE_IXLEN_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kmadrs32, kmadrs32, RISCV_IXLEN_FTYPE_IXLEN_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kmaxds32, kmaxds32, RISCV_IXLEN_FTYPE_IXLEN_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kmads32, kmads32, RISCV_IXLEN_FTYPE_IXLEN_IXLEN_IXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kmadrs32, kmadrs32, RISCV_IXLEN_FTYPE_IXLEN_IXLEN_IXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kmaxds32, kmaxds32, RISCV_IXLEN_FTYPE_IXLEN_IXLEN_IXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kmads32, v_kmads32, RISCV_IXLEN_FTYPE_IXLEN_V2SI_V2SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kmadrs32, v_kmadrs32, RISCV_IXLEN_FTYPE_IXLEN_V2SI_V2SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kmaxds32, v_kmaxds32, RISCV_IXLEN_FTYPE_IXLEN_V2SI_V2SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kmsda32, kmsda32, RISCV_IXLEN_FTYPE_IXLEN_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kmsxda32, kmsxda32, RISCV_IXLEN_FTYPE_IXLEN_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kmsda32, kmsda32, RISCV_IXLEN_FTYPE_IXLEN_IXLEN_IXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kmsxda32, kmsxda32, RISCV_IXLEN_FTYPE_IXLEN_IXLEN_IXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kmsda32, v_kmsda32, RISCV_IXLEN_FTYPE_IXLEN_V2SI_V2SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kmsxda32, v_kmsxda32, RISCV_IXLEN_FTYPE_IXLEN_V2SI_V2SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (ksll32, ksll32, RISCV_UIXLEN_FTYPE_UIXLEN_USI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (ksll32, ksll32, RISCV_IXLEN_FTYPE_IXLEN_USI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (ksll32, v_ksll32, RISCV_V2SI_FTYPE_V2SI_USI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kslrav2si, kslra32, RISCV_UIXLEN_FTYPE_UIXLEN_SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kslrav2si_round, kslra32_u, RISCV_UIXLEN_FTYPE_UIXLEN_SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kslrav2si, kslra32, RISCV_DI_FTYPE_DI_SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kslrav2si_round, kslra32_u, RISCV_DI_FTYPE_DI_SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kslrav2si, v_kslra32, RISCV_V2SI_FTYPE_V2SI_SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kslrav2si_round, v_kslra32_u, RISCV_V2SI_FTYPE_V2SI_SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kstasv2si, kstas32, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kstasv2si, v_kstas32, RISCV_V2SI_FTYPE_V2SI_V2SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kstsav2si, kstsa32, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kstsav2si, kstsa32, RISCV_IXLEN_FTYPE_IXLEN_IXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (kstsav2si, v_kstsa32, RISCV_V2SI_FTYPE_V2SI_V2SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (ksubv2si3, ksub32, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (ksubv2si3, ksub32, RISCV_IXLEN_FTYPE_IXLEN_IXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (ksubv2si3, v_ksub32, RISCV_V2SI_FTYPE_V2SI_V2SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (pkbbv2si, pkbb32, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (pkbtv2si, pkbt32, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
Expand All @@ -769,40 +769,40 @@ DIRECT_BUILTIN_NO_PREFIX (pkbbv2si, v_pkbb32, RISCV_UV2SI_FTYPE_UV2SI_UV2SI, zpn
DIRECT_BUILTIN_NO_PREFIX (pkbtv2si, v_pkbt32, RISCV_UV2SI_FTYPE_UV2SI_UV2SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (pktbv2si, v_pktb32, RISCV_UV2SI_FTYPE_UV2SI_UV2SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (pkttv2si, v_pktt32, RISCV_UV2SI_FTYPE_UV2SI_UV2SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (raddv2si3, radd32, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (raddv2si3, radd32, RISCV_IXLEN_FTYPE_IXLEN_IXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (raddv2si3, v_radd32, RISCV_V2SI_FTYPE_V2SI_V2SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (rcrasv2si, rcras32, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (rcrasv2si, rcras32, RISCV_IXLEN_FTYPE_IXLEN_IXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (rcrasv2si, v_rcras32, RISCV_V2SI_FTYPE_V2SI_V2SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (rcrsav2si, v_rcrsa32, RISCV_V2SI_FTYPE_V2SI_V2SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (rcrsav2si, rcrsa32, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (rstasv2si, rstas32, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (rcrsav2si, rcrsa32, RISCV_IXLEN_FTYPE_IXLEN_IXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (rstasv2si, rstas32, RISCV_IXLEN_FTYPE_IXLEN_IXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (rstasv2si, v_rstas32, RISCV_V2SI_FTYPE_V2SI_V2SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (rstsav2si, rstsa32, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (rstsav2si, rstsa32, RISCV_IXLEN_FTYPE_IXLEN_IXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (rstsav2si, v_rstsa32, RISCV_V2SI_FTYPE_V2SI_V2SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (rsubv2si3, rsub32, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (rsubv2si3, rsub32, RISCV_IXLEN_FTYPE_IXLEN_IXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (rsubv2si3, v_rsub32, RISCV_V2SI_FTYPE_V2SI_V2SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (ashlv2si3, sll32, RISCV_UIXLEN_FTYPE_UIXLEN_USI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (ashlv2si3, v_sll32, RISCV_UV2SI_FTYPE_UV2SI_USI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (smaxv2si3, smax32, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (smaxv2si3, smax32, RISCV_IXLEN_FTYPE_IXLEN_IXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (smaxv2si3, v_smax32, RISCV_V2SI_FTYPE_V2SI_V2SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (smbb32, smbb32, RISCV_IXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (smbt32, smbt32, RISCV_IXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (smtt32, smtt32, RISCV_IXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (smbb32, smbb32, RISCV_IXLEN_FTYPE_IXLEN_IXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (smbt32, smbt32, RISCV_IXLEN_FTYPE_IXLEN_IXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (smtt32, smtt32, RISCV_IXLEN_FTYPE_IXLEN_IXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (smbb32, v_smbb32, RISCV_IXLEN_FTYPE_V2SI_V2SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (smbt32, v_smbt32, RISCV_IXLEN_FTYPE_V2SI_V2SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (smtt32, v_smtt32, RISCV_IXLEN_FTYPE_V2SI_V2SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (smds32, smds32, RISCV_IXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (smdrs32, smdrs32, RISCV_IXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (smxds32, smxds32, RISCV_IXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (smds32, smds32, RISCV_IXLEN_FTYPE_IXLEN_IXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (smdrs32, smdrs32, RISCV_IXLEN_FTYPE_IXLEN_IXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (smxds32, smxds32, RISCV_IXLEN_FTYPE_IXLEN_IXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (smds32, v_smds32, RISCV_IXLEN_FTYPE_V2SI_V2SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (smdrs32, v_smdrs32, RISCV_IXLEN_FTYPE_V2SI_V2SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (smxds32, v_smxds32, RISCV_IXLEN_FTYPE_V2SI_V2SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (sminv2si3, smin32, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (sminv2si3, smin32, RISCV_IXLEN_FTYPE_IXLEN_IXLEN, zpn64),
DIRECT_BUILTIN_NO_PREFIX (sminv2si3, v_smin32, RISCV_V2SI_FTYPE_V2SI_V2SI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (ashrv2si3, v_sra32, RISCV_V2SI_FTYPE_V2SI_USI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (sra32_round, v_sra32_u, RISCV_V2SI_FTYPE_V2SI_USI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (ashrv2si3, sra32, RISCV_UIXLEN_FTYPE_UIXLEN_USI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (sra32_round, sra32_u, RISCV_UIXLEN_FTYPE_UIXLEN_USI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (ashrv2si3, sra32, RISCV_IXLEN_FTYPE_IXLEN_USI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (sra32_round, sra32_u, RISCV_IXLEN_FTYPE_IXLEN_USI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (sraiw_u, sraw_u, RISCV_SI_FTYPE_SI_USI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (lshrv2si3, srl32, RISCV_UIXLEN_FTYPE_UIXLEN_USI, zpn64),
DIRECT_BUILTIN_NO_PREFIX (srl32_round, srl32_u, RISCV_UIXLEN_FTYPE_UIXLEN_USI, zpn64),
Expand Down Expand Up @@ -945,12 +945,12 @@ DIRECT_BUILTIN_NO_PREFIX (smul8, smul8, RISCV_UDI_FTYPE_USI_USI, zpsf),
DIRECT_BUILTIN_NO_PREFIX (smul8, v_smul8, RISCV_V4HI_FTYPE_V4QI_V4QI, zpsf),
DIRECT_BUILTIN_NO_PREFIX (smulx8, smulx8, RISCV_UDI_FTYPE_USI_USI, zpsf),
DIRECT_BUILTIN_NO_PREFIX (smulx8, v_smulx8, RISCV_V4HI_FTYPE_V4QI_V4QI, zpsf),
DIRECT_BUILTIN_NO_PREFIX (smul16, smul16, RISCV_UDI_FTYPE_USI_USI, zpsf32),
DIRECT_BUILTIN_NO_PREFIX (smul16_64, smul16, RISCV_UDI_FTYPE_USI_USI, zpsf64),
DIRECT_BUILTIN_NO_PREFIX (smul16, smul16, RISCV_DI_FTYPE_USI_USI, zpsf32),
DIRECT_BUILTIN_NO_PREFIX (smul16_64, smul16, RISCV_DI_FTYPE_USI_USI, zpsf64),
DIRECT_BUILTIN_NO_PREFIX (smul16, v_smul16, RISCV_V2SI_FTYPE_V2HI_V2HI, zpsf32),
DIRECT_BUILTIN_NO_PREFIX (smul16_64, v64_smul16, RISCV_V2SI_FTYPE_V2HI_V2HI, zpsf64),
DIRECT_BUILTIN_NO_PREFIX (smulx16, smulx16, RISCV_UDI_FTYPE_USI_USI, zpsf32),
DIRECT_BUILTIN_NO_PREFIX (smulx16_64, smulx16, RISCV_UDI_FTYPE_USI_USI, zpsf64),
DIRECT_BUILTIN_NO_PREFIX (smulx16, smulx16, RISCV_DI_FTYPE_USI_USI, zpsf32),
DIRECT_BUILTIN_NO_PREFIX (smulx16_64, smulx16, RISCV_DI_FTYPE_USI_USI, zpsf64),
DIRECT_BUILTIN_NO_PREFIX (smulx16, v_smulx16, RISCV_V2SI_FTYPE_V2HI_V2HI, zpsf32),
DIRECT_BUILTIN_NO_PREFIX (smulx16_64, v_smulx16, RISCV_V2SI_FTYPE_V2HI_V2HI, zpsf64),
DIRECT_BUILTIN_NO_PREFIX (wext, wext, RISCV_IXLEN_FTYPE_UDI_USI, zpsf32),
Expand All @@ -961,5 +961,7 @@ DIRECT_BUILTIN_NO_PREFIX (fsrw, fsrw, RISCV_USI_FTYPE_USI_USI_USI, zbpbo64),
DIRECT_BUILTIN_NO_PREFIX (fsr, fsr, RISCV_USI_FTYPE_USI_USI_USI, zbpbo32),
DIRECT_BUILTIN_NO_PREFIX (cmixsi, cmix, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN_UIXLEN, zbpbo32),
DIRECT_BUILTIN_NO_PREFIX (cmixdi, cmix, RISCV_UIXLEN_FTYPE_UIXLEN_UIXLEN_UIXLEN, zbpbo64),
DIRECT_BUILTIN_NO_PREFIX (smaxsi3, max, RISCV_SI_FTYPE_SI_SI, zbpbo),
DIRECT_BUILTIN_NO_PREFIX (sminsi3, min, RISCV_SI_FTYPE_SI_SI, zbpbo),
DIRECT_BUILTIN_NO_PREFIX (smaxsi3, max, RISCV_SI_FTYPE_SI_SI, zbpbo32),
DIRECT_BUILTIN_NO_PREFIX (sminsi3, min, RISCV_SI_FTYPE_SI_SI, zbpbo32),
DIRECT_BUILTIN_NO_PREFIX (smaxdi3, max, RISCV_DI_FTYPE_DI_DI, zbpbo64),
DIRECT_BUILTIN_NO_PREFIX (smindi3, min, RISCV_DI_FTYPE_DI_DI, zbpbo64),
3 changes: 2 additions & 1 deletion gcc/config/riscv/riscv-builtins.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ AVAIL (zpsf, TARGET_ZPSF)
AVAIL (zpsf32, TARGET_ZPSF && !TARGET_64BIT)
AVAIL (zpsf64, TARGET_ZPSF && TARGET_64BIT)

AVAIL (zbpbo, TARGET_ZBPBO)
AVAIL (zbpbo32, TARGET_ZBPBO && !TARGET_64BIT)
AVAIL (zbpbo64, TARGET_ZBPBO && TARGET_64BIT)

Expand Down Expand Up @@ -177,6 +176,8 @@ tree int_xlen_node;

/* Argument types. */
#define RISCV_ATYPE_VOID void_type_node
#define RISCV_ATYPE_UHI unsigned_intHI_type_node
#define RISCV_ATYPE_HI intHI_type_node
#define RISCV_ATYPE_USI unsigned_intSI_type_node
#define RISCV_ATYPE_SI intSI_type_node
#define RISCV_ATYPE_DI intDI_type_node
Expand Down
3 changes: 3 additions & 0 deletions gcc/config/riscv/riscv-ftypes.def
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ DEF_RISCV_FTYPE (2, (DI, DI, UIXLEN))
DEF_RISCV_FTYPE (2, (DI, DI, USI))
DEF_RISCV_FTYPE (2, (DI, DI, V2HI))
DEF_RISCV_FTYPE (2, (DI, DI, V4HI))
DEF_RISCV_FTYPE (2, (DI, USI, USI))
DEF_RISCV_FTYPE (2, (DI, SI, SI))
DEF_RISCV_FTYPE (2, (IXLEN, IXLEN, IXLEN))
DEF_RISCV_FTYPE (2, (IXLEN, IXLEN, UIXLEN))
Expand Down Expand Up @@ -125,6 +126,8 @@ DEF_RISCV_FTYPE (2, (V4QI, V4QI, V4QI))
DEF_RISCV_FTYPE (2, (V8QI, V8QI, SI))
DEF_RISCV_FTYPE (2, (V8QI, V8QI, USI))
DEF_RISCV_FTYPE (2, (V8QI, V8QI, V8QI))
DEF_RISCV_FTYPE (2, (HI, HI, HI))
DEF_RISCV_FTYPE (2, (UHI, UHI, UHI))
DEF_RISCV_FTYPE (3, (DI, DI, IXLEN, IXLEN))
DEF_RISCV_FTYPE (3, (DI, DI, UIXLEN, UIXLEN))
DEF_RISCV_FTYPE (3, (DI, DI, V2HI, V2HI))
Expand Down
Loading

0 comments on commit 7eeadf6

Please sign in to comment.