Skip to content

Conversation

@toor1245
Copy link
Contributor

To implement support aarch64 for Windows, macOS and FreeBSD I moved common logic to src/impl_aarch64__base_implementation.inl which is consistency to x86 base impl

@toor1245 toor1245 force-pushed the aarch64-support-separate-common-os-logic branch from 346b4d5 to 030f190 Compare August 16, 2022 02:09
@Mizux Mizux added the Apple M1 Apple M1 related issues label Aug 18, 2022
@Mizux Mizux self-assigned this Aug 18, 2022
@toor1245 toor1245 force-pushed the aarch64-support-separate-common-os-logic branch from 030f190 to 392c1c0 Compare August 18, 2022 14:00
To add support AARCH64 for other operating systems such as macOS(Apple M1), ios, FreeBSD, Windows has been moved common logic from 
`src/impl_aarch64_linux_or_android.c` to `src/impl_aarch64__base_implementation.inl`, namely:
* Definitions for introspection
* `Aarch64Info` kEmptyAarch64Info field

Removed include "internal/bit_utils.h" from `src/impl_aarch64_linux_or_android.c`, since this include was not used. Also, include `cpuinfo_aarch64` has been removed from linux implementation and replaced with `impl_aarch64__base_implementation.inl`, this include will be used for all other operating systems impl as well

Added a compilation check that matches the base X86 implementation

Refs: google#121
See also: google#150, google#186, google#204
@toor1245 toor1245 force-pushed the aarch64-support-separate-common-os-logic branch from 392c1c0 to a691acb Compare August 18, 2022 14:04
Copy link
Collaborator

@Mizux Mizux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx !

@toor1245 toor1245 mentioned this pull request Aug 30, 2022
toor1245 pushed a commit to toor1245/cpu_features that referenced this pull request Jan 22, 2023
To add Windows Arm64 support was added detection of features via Windows API function IsProcessorFeaturePresent. Added _M_ARM64 to detect CPU_FEATURES_AARCH64 macro on Windows. Added initial code for Windows Arm64 testing and provided test for Raspberry PI 4. We can't use "define_introspection_and_hwcaps.inl" as a common file for all operating systems due to msvc compiler error C2099: initializer is not a constant, so as a workaround for Windows I used separate "define_introspection.inl"

See also: google#268, google#284, google#186
toor1245 pushed a commit to toor1245/cpu_features that referenced this pull request Jan 22, 2023
To add Windows Arm64 support was added detection of features via Windows API function IsProcessorFeaturePresent. Added _M_ARM64 to detect CPU_FEATURES_AARCH64 macro on Windows. Added initial code for Windows Arm64 testing and provided test for Raspberry PI 4. We can't use "define_introspection_and_hwcaps.inl" as a common file for all operating systems due to msvc compiler error C2099: initializer is not a constant, so as a workaround for Windows I used separate "define_introspection.inl"

See also: google#268, google#284, google#186
gchatelet pushed a commit that referenced this pull request Feb 23, 2023
* Add Windows Arm64 support

To add Windows Arm64 support was added detection of features via Windows API function IsProcessorFeaturePresent. Added _M_ARM64 to detect CPU_FEATURES_AARCH64 macro on Windows. Added initial code for Windows Arm64 testing and provided test for Raspberry PI 4. We can't use "define_introspection_and_hwcaps.inl" as a common file for all operating systems due to msvc compiler error C2099: initializer is not a constant, so as a workaround for Windows I used separate "define_introspection.inl"

See also: #268, #284, #186

* [CMake] Add  windows_utils.h to PROCESSOR_IS_AARCH64

* Add detection of armv8.1 atomic instructions

* Update note on win-arm64 implementation and move to cpuinfo_aarch64.h

* Remove redundant #ifdef CPU_FEATURES_OS_WINDOWS

* Add note on FP/SIMD and Cryptographic Extension for win-arm64

* Add comments to Aarch64Info fields

Added comments to specify that implementer, part and variant we set 0 for Windows, since Win API does not provide a way to get information. For revision added comment that we use GetNativeSystemInfo
@toor1245 toor1245 closed this Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Apple M1 Apple M1 related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants