Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Dec 2018 00:51:58 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r486566 - in head/multimedia: aom/files libvpx/files
Message-ID:  <201812040051.wB40pwiJ035770@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Tue Dec  4 00:51:58 2018
New Revision: 486566
URL: https://svnweb.freebsd.org/changeset/ports/486566

Log:
  multimedia/libvpx: standardize variable name holding AT_HWCAP value

Modified:
  head/multimedia/aom/files/patch-aom__ports_arm__cpudetect.c   (contents, props changed)
  head/multimedia/aom/files/patch-aom__ports_ppc__cpudetect.c   (contents, props changed)
  head/multimedia/libvpx/files/patch-vpx__ports_arm__cpudetect.c   (contents, props changed)
  head/multimedia/libvpx/files/patch-vpx__ports_ppc__cpudetect.c   (contents, props changed)

Modified: head/multimedia/aom/files/patch-aom__ports_arm__cpudetect.c
==============================================================================
--- head/multimedia/aom/files/patch-aom__ports_arm__cpudetect.c	Tue Dec  4 00:51:44 2018	(r486565)
+++ head/multimedia/aom/files/patch-aom__ports_arm__cpudetect.c	Tue Dec  4 00:51:58 2018	(r486566)
@@ -52,18 +52,18 @@
 +int aom_arm_cpu_caps(void) {
 +  int flags;
 +  int mask;
-+  u_long hwcaps = 0;
++  u_long hwcap = 0;
 +  if (!arm_cpu_env_flags(&flags)) {
 +    return flags;
 +  }
 +  mask = arm_cpu_env_mask();
 +#if __FreeBSD__ < 12
-+  hwcaps = getauxval(AT_HWCAP);
++  hwcap = getauxval(AT_HWCAP);
 +#else
-+  elf_aux_info(AT_HWCAP, &hwcaps, sizeof(hwcaps));
++  elf_aux_info(AT_HWCAP, &hwcap, sizeof(hwcap));
 +#endif
 +#if HAVE_NEON
-+  if (hwcaps & HWCAP_NEON) flags |= HAS_NEON;
++  if (hwcap & HWCAP_NEON) flags |= HAS_NEON;
 +#endif
 +  return flags & mask;
 +}

Modified: head/multimedia/aom/files/patch-aom__ports_ppc__cpudetect.c
==============================================================================
--- head/multimedia/aom/files/patch-aom__ports_ppc__cpudetect.c	Tue Dec  4 00:51:44 2018	(r486565)
+++ head/multimedia/aom/files/patch-aom__ports_ppc__cpudetect.c	Tue Dec  4 00:51:58 2018	(r486566)
@@ -45,7 +45,7 @@
 +int ppc_simd_caps(void) {
 +  int flags;
 +  int mask;
-+  u_long cpu_features = 0;
++  u_long hwcap = 0;
 +
 +  // If AOM_SIMD_CAPS is set then allow only those capabilities.
 +  if (!cpu_env_flags(&flags)) {
@@ -55,13 +55,13 @@
 +  mask = cpu_env_mask();
 +
 +#if __FreeBSD__ < 12
-+  size_t sz = sizeof(cpu_features);
-+  sysctlbyname("hw.cpu_features", &cpu_features, &sz, NULL, 0);
++  size_t sz = sizeof(hwcap);
++  sysctlbyname("hw.cpu_features", &hwcap, &sz, NULL, 0);
 +#else
-+  elf_aux_info(AT_HWCAP, &cpu_features, sizeof(cpu_features));
++  elf_aux_info(AT_HWCAP, &hwcap, sizeof(hwcap));
 +#endif
 +#if HAVE_VSX
-+  if (cpu_features & PPC_FEATURE_HAS_VSX) flags |= HAS_VSX;
++  if (hwcap & PPC_FEATURE_HAS_VSX) flags |= HAS_VSX;
 +#endif
 +
 +  return flags & mask;

Modified: head/multimedia/libvpx/files/patch-vpx__ports_arm__cpudetect.c
==============================================================================
--- head/multimedia/libvpx/files/patch-vpx__ports_arm__cpudetect.c	Tue Dec  4 00:51:44 2018	(r486565)
+++ head/multimedia/libvpx/files/patch-vpx__ports_arm__cpudetect.c	Tue Dec  4 00:51:58 2018	(r486566)
@@ -49,18 +49,18 @@
 +int arm_cpu_caps(void) {
 +  int flags;
 +  int mask;
-+  u_long hwcaps = 0;
++  u_long hwcap = 0;
 +  if (!arm_cpu_env_flags(&flags)) {
 +    return flags;
 +  }
 +  mask = arm_cpu_env_mask();
 +#if __FreeBSD__ < 12
-+  hwcaps = getauxval(AT_HWCAP);
++  hwcap = getauxval(AT_HWCAP);
 +#else
-+  elf_aux_info(AT_HWCAP, &hwcaps, sizeof(hwcaps));
++  elf_aux_info(AT_HWCAP, &hwcap, sizeof(hwcap));
 +#endif
 +#if HAVE_NEON || HAVE_NEON_ASM
-+  if (hwcaps & HWCAP_NEON) flags |= HAS_NEON;
++  if (hwcap & HWCAP_NEON) flags |= HAS_NEON;
 +#endif
 +  return flags & mask;
 +}

Modified: head/multimedia/libvpx/files/patch-vpx__ports_ppc__cpudetect.c
==============================================================================
--- head/multimedia/libvpx/files/patch-vpx__ports_ppc__cpudetect.c	Tue Dec  4 00:51:44 2018	(r486565)
+++ head/multimedia/libvpx/files/patch-vpx__ports_ppc__cpudetect.c	Tue Dec  4 00:51:58 2018	(r486566)
@@ -43,7 +43,7 @@
 +int ppc_simd_caps(void) {
 +  int flags;
 +  int mask;
-+  u_long cpu_features = 0;
++  u_long hwcap = 0;
 +
 +  // If VPX_SIMD_CAPS is set then allow only those capabilities.
 +  if (!cpu_env_flags(&flags)) {
@@ -53,13 +53,13 @@
 +  mask = cpu_env_mask();
 +
 +#if __FreeBSD__ < 12
-+  size_t sz = sizeof(cpu_features);
-+  sysctlbyname("hw.cpu_features", &cpu_features, &sz, NULL, 0);
++  size_t sz = sizeof(hwcap);
++  sysctlbyname("hw.cpu_features", &hwcap, &sz, NULL, 0);
 +#else
-+  elf_aux_info(AT_HWCAP, &cpu_features, sizeof(cpu_features));
++  elf_aux_info(AT_HWCAP, &hwcap, sizeof(hwcap));
 +#endif
 +#if HAVE_VSX
-+  if (cpu_features & PPC_FEATURE_HAS_VSX) flags |= HAS_VSX;
++  if (hwcap & PPC_FEATURE_HAS_VSX) flags |= HAS_VSX;
 +#endif
 +
 +  return flags & mask;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812040051.wB40pwiJ035770>