git: f37a2ade7730 - stable/13 - share/mk/bsd.cpu.mk: add AltiVec / VSX to powerpc*'s MACHINE_CPU

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Mon, 08 May 2023 00:57:38 UTC
The branch stable/13 has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/src/commit/?id=f37a2ade7730cfcdaf754a6b4b9201002ba46730

commit f37a2ade7730cfcdaf754a6b4b9201002ba46730
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2023-05-05 14:19:19 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2023-05-08 00:58:05 +0000

    share/mk/bsd.cpu.mk: add AltiVec / VSX to powerpc*'s MACHINE_CPU
    
    MFC after:      3 days
    Approved by:    jhibbits
    Differential revision:  https://reviews.freebsd.org/D39240
    
    (cherry picked from commit 448045e4a7873f4733cebda56df002acabb2aef1)
---
 share/mk/bsd.cpu.mk | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/share/mk/bsd.cpu.mk b/share/mk/bsd.cpu.mk
index cc907d79d03e..ed8040d1c192 100644
--- a/share/mk/bsd.cpu.mk
+++ b/share/mk/bsd.cpu.mk
@@ -284,6 +284,25 @@ MACHINE_CPU = mips
 . elif ${MACHINE_ARCH} == "powerpc"
 .  if ${CPUTYPE} == "e500"
 MACHINE_CPU = booke softfp
+.  elif ${CPUTYPE} == "g4"
+MACHINE_CPU = altivec
+.  endif
+. elif ${MACHINE_ARCH} == "powerpc64"
+.  if ${CPUTYPE} == "e5500"
+MACHINE_CPU = booke
+.  elif ${CPUTYPE} == power7
+MACHINE_CPU = altivec vsx
+.  elif ${CPUTYPE} == power8
+MACHINE_CPU = altivec vsx vsx2
+.  elif ${CPUTYPE} == power9
+MACHINE_CPU = altivec vsx vsx2 vsx3
+.  else
+MACHINE_CPU = altivec
+.  endif
+. elif ${MACHINE_ARCH} == "powerpc64le"
+MACHINE_CPU = altivec vsx vsx2
+.  if ${CPUTYPE} == power9
+MACHINE_CPU += vsx3
 .  endif
 ########## riscv
 . elif ${MACHINE_CPUARCH} == "riscv"