summaryrefslogtreecommitdiff
path: root/renderscript/clang-include/bmi2intrin.h
diff options
context:
space:
mode:
authorChris Warrington <cmw@google.com>2021-06-28 17:24:50 +0100
committerChris Warrington <cmw@google.com>2021-06-28 17:39:37 +0100
commit5074774ea2223b32b73717896c2e722df523c67b (patch)
tree567c5c7059f97b211f8334fecc2649c70dd4069d /renderscript/clang-include/bmi2intrin.h
parent06d1512aa5252e682ed9b9b54e94063399be04c6 (diff)
download30.0.3-5074774ea2223b32b73717896c2e722df523c67b.tar.gz
Add prebuilts for linux build-tools 30.0.3HEADmastermainandroidx-work-releaseandroidx-window-releaseandroidx-webkit-releaseandroidx-wear-wear-remote-interactions-releaseandroidx-wear-wear-phone-interactions-releaseandroidx-wear-wear-ongoing-releaseandroidx-wear-wear-input-releaseandroidx-wear-watchface-releaseandroidx-wear-tiles-releaseandroidx-wear-releaseandroidx-wear-platform-releaseandroidx-wear-compose-releaseandroidx-vectordrawable-releaseandroidx-tracing-releaseandroidx-startup-releaseandroidx-sqlite-releaseandroidx-slidingpanelayout-releaseandroidx-sharetarget-releaseandroidx-savedstate-releaseandroidx-room-releaseandroidx-resourceinspection-releaseandroidx-recyclerview-releaseandroidx-preference-releaseandroidx-paging-releaseandroidx-navigation-releaseandroidx-metrics-releaseandroidx-mediarouter-releaseandroidx-media2-releaseandroidx-media-releaseandroidx-main-releaseandroidx-localbroadcastmanager-releaseandroidx-lifecycle-releaseandroidx-hilt-releaseandroidx-glance-releaseandroidx-g3-releaseandroidx-fragment-releaseandroidx-emoji2-releaseandroidx-drawerlayout-releaseandroidx-draganddrop-releaseandroidx-datastore-releaseandroidx-core-releaseandroidx-core-core-splashscreen-releaseandroidx-core-core-role-releaseandroidx-coordinatorlayout-releaseandroidx-compose-releaseandroidx-compose-material3-releaseandroidx-compose-integration-releaseandroidx-collection-releaseandroidx-car-app-releaseandroidx-browser-releaseandroidx-benchmark-releaseandroidx-arch-core-releaseandroidx-appcompat-releaseandroidx-annotation-releaseandroidx-annotation-annotation-experimental-releaseandroidx-activity-releaseandroid-games-sdk-releaseandroid-games-sdk-games-performance-tuner-releaseandroid-games-sdk-games-memory-advice-releaseandroid-games-sdk-games-frame-pacing-releaseandroid-games-sdk-games-controller-releaseandroid-games-sdk-game-text-input-releaseandroid-games-sdk-game-activity-release
https://dl.google.com/android/repository/build-tools_r30.0.3-linux.zip Test: ./gradlew bOS Change-Id: Ieb13bf077c12dffc9a934feca549837ca779f1ee
Diffstat (limited to 'renderscript/clang-include/bmi2intrin.h')
-rw-r--r--renderscript/clang-include/bmi2intrin.h95
1 files changed, 95 insertions, 0 deletions
diff --git a/renderscript/clang-include/bmi2intrin.h b/renderscript/clang-include/bmi2intrin.h
new file mode 100644
index 0000000..fdae82c
--- /dev/null
+++ b/renderscript/clang-include/bmi2intrin.h
@@ -0,0 +1,95 @@
+/*===---- bmi2intrin.h - BMI2 intrinsics -----------------------------------===
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ *
+ *===-----------------------------------------------------------------------===
+ */
+
+#if !defined __X86INTRIN_H && !defined __IMMINTRIN_H
+#error "Never use <bmi2intrin.h> directly; include <x86intrin.h> instead."
+#endif
+
+#ifndef __BMI2INTRIN_H
+#define __BMI2INTRIN_H
+
+/* Define the default attributes for the functions in this file. */
+#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("bmi2")))
+
+static __inline__ unsigned int __DEFAULT_FN_ATTRS
+_bzhi_u32(unsigned int __X, unsigned int __Y)
+{
+ return __builtin_ia32_bzhi_si(__X, __Y);
+}
+
+static __inline__ unsigned int __DEFAULT_FN_ATTRS
+_pdep_u32(unsigned int __X, unsigned int __Y)
+{
+ return __builtin_ia32_pdep_si(__X, __Y);
+}
+
+static __inline__ unsigned int __DEFAULT_FN_ATTRS
+_pext_u32(unsigned int __X, unsigned int __Y)
+{
+ return __builtin_ia32_pext_si(__X, __Y);
+}
+
+#ifdef __x86_64__
+
+static __inline__ unsigned long long __DEFAULT_FN_ATTRS
+_bzhi_u64(unsigned long long __X, unsigned long long __Y)
+{
+ return __builtin_ia32_bzhi_di(__X, __Y);
+}
+
+static __inline__ unsigned long long __DEFAULT_FN_ATTRS
+_pdep_u64(unsigned long long __X, unsigned long long __Y)
+{
+ return __builtin_ia32_pdep_di(__X, __Y);
+}
+
+static __inline__ unsigned long long __DEFAULT_FN_ATTRS
+_pext_u64(unsigned long long __X, unsigned long long __Y)
+{
+ return __builtin_ia32_pext_di(__X, __Y);
+}
+
+static __inline__ unsigned long long __DEFAULT_FN_ATTRS
+_mulx_u64 (unsigned long long __X, unsigned long long __Y,
+ unsigned long long *__P)
+{
+ unsigned __int128 __res = (unsigned __int128) __X * __Y;
+ *__P = (unsigned long long) (__res >> 64);
+ return (unsigned long long) __res;
+}
+
+#else /* !__x86_64__ */
+
+static __inline__ unsigned int __DEFAULT_FN_ATTRS
+_mulx_u32 (unsigned int __X, unsigned int __Y, unsigned int *__P)
+{
+ unsigned long long __res = (unsigned long long) __X * __Y;
+ *__P = (unsigned int) (__res >> 32);
+ return (unsigned int) __res;
+}
+
+#endif /* !__x86_64__ */
+
+#undef __DEFAULT_FN_ATTRS
+
+#endif /* __BMI2INTRIN_H */