git: 448045e4a787 - main - share/mk/bsd.cpu.mk: add AltiVec / VSX to powerpc*'s MACHINE_CPU

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Fri, 05 May 2023 14:20:23 UTC
The branch main has been updated by pkubaj:

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

commit 448045e4a7873f4733cebda56df002acabb2aef1
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2023-05-05 14:19:19 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2023-05-05 14:20:28 +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
---
 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 dbd58a385b23..ba18204b9230 100644
--- a/share/mk/bsd.cpu.mk
+++ b/share/mk/bsd.cpu.mk
@@ -276,6 +276,25 @@ MACHINE_CPU += amd64 sse2 sse mmx
 . 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"