diff options
author | Dan McDonald <danmcd@mnx.io> | 2022-09-12 13:07:56 -0400 |
---|---|---|
committer | Dan McDonald <danmcd@mnx.io> | 2022-09-12 13:07:56 -0400 |
commit | 920ee8aa55ad6d75d178844ba75e28ef7f3010ca (patch) | |
tree | 1f9c5497c4e5423aaa8467c001caf1fbd4828e05 /usr/src/lib/libc | |
parent | ade9f3397df3a9ce9857bfb480ae00df04ce9933 (diff) | |
parent | f8e9c7b3ba7100b047717589235b6d05ec43646c (diff) | |
download | illumos-joyent-920ee8aa55ad6d75d178844ba75e28ef7f3010ca.tar.gz |
[illumos-gate merge]
commit f8e9c7b3ba7100b047717589235b6d05ec43646c
14925 plumb DFv4 into amdzen(4D)
commit ba215efe42e70993d3838f7af671f9d9fc0ebc33
14936 need a better SMN addressing mechanism
commit 56726c7e321b6e5ecb2f10215f5386016547e68c
14821 Add additional AVX512 capabilities
14822 Need new word of hardware capabilities
14823 aux vector feature mapping should use x86_featureset
commit f2ae17ede4a9a93585872a9aa83120497285bdd0
14077 Want wrapper for external SMB server tests
commit 544783ca6fcbe20a0c82b42aabd4e88a9ac69e68
14960 mountd: cleaning up some build gags
commit 153f3212c5a48deec74be10ba87dd04bc99edbbb
14815 nvmeadm: identify support for namespace management
Conflicts:
manifest
usr/src/cmd/sgs/libconv/common/corenote.c
usr/src/cmd/sgs/libconv/common/corenote.msg
usr/src/cmd/sgs/rtld/common/globals.c
usr/src/cmd/sgs/rtld/common/rtld.msg
usr/src/cmd/sgs/rtld/common/setup.c
usr/src/uts/common/exec/elf/elf.c
usr/src/uts/common/os/exec.c
usr/src/uts/common/sys/user.h
usr/src/uts/intel/os/cpuid.c
usr/src/uts/intel/os/driver_aliases
Diffstat (limited to 'usr/src/lib/libc')
-rw-r--r-- | usr/src/lib/libc/port/gen/getisax.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/usr/src/lib/libc/port/gen/getisax.c b/usr/src/lib/libc/port/gen/getisax.c index c721528fb3..85d60eb192 100644 --- a/usr/src/lib/libc/port/gen/getisax.c +++ b/usr/src/lib/libc/port/gen/getisax.c @@ -25,6 +25,7 @@ */ /* * Copyright (c) 2012, Joyent, Inc. All rights reserved. + * Copyright 2022 Oxide Computer Company */ #pragma weak _getisax = getisax @@ -48,10 +49,12 @@ getisax(uint32_t *array, uint_t n) int i; static uint32_t auxv_hwcap; static uint32_t auxv_hwcap_2; + static uint32_t auxv_hwcap_3; if (auxv_hwcap == 0) { auxv_hwcap = (uint32_t)___getauxval(AT_SUN_HWCAP); auxv_hwcap_2 = (uint32_t)___getauxval(AT_SUN_HWCAP2); + auxv_hwcap_3 = (uint32_t)___getauxval(AT_SUN_HWCAP3); } if (n > 0) { @@ -59,9 +62,15 @@ getisax(uint32_t *array, uint_t n) array[0] = auxv_hwcap; if (n >= 2) array[1] = auxv_hwcap_2; - for (i = 2; i < n; i++) + if (n >= 3) + array[2] = auxv_hwcap_3; + for (i = 3; i < n; i++) array[i] = 0; } - return (auxv_hwcap == 0 ? 0 : n >= 2 ? 2 : 1); + if (auxv_hwcap == 0) { + return (0); + } + + return (n >= 3 ? 3 : n); } |