movdirintrin.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /* Copyright (C) 2018-2019 Free Software Foundation, Inc.
  2. This file is part of GCC.
  3. GCC is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation; either version 3, or (at your option)
  6. any later version.
  7. GCC is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. Under Section 7 of GPL version 3, you are granted additional
  12. permissions described in the GCC Runtime Library Exception, version
  13. 3.1, as published by the Free Software Foundation.
  14. You should have received a copy of the GNU General Public License and
  15. a copy of the GCC Runtime Library Exception along with this program;
  16. see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
  17. <http://www.gnu.org/licenses/>. */
  18. #if !defined _IMMINTRIN_H_INCLUDED
  19. # error "Never use <movdirintrin.h> directly; include <x86intrin.h> instead."
  20. #endif
  21. #ifndef _MOVDIRINTRIN_H_INCLUDED
  22. #define _MOVDIRINTRIN_H_INCLUDED
  23. #ifndef __MOVDIRI__
  24. #pragma GCC push_options
  25. #pragma GCC target ("movdiri")
  26. #define __DISABLE_MOVDIRI__
  27. #endif /* __MOVDIRI__ */
  28. extern __inline void
  29. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  30. _directstoreu_u32 (void * __P, unsigned int __A)
  31. {
  32. __builtin_ia32_directstoreu_u32 ((unsigned int *)__P, __A);
  33. }
  34. #ifdef __x86_64__
  35. extern __inline void
  36. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  37. _directstoreu_u64 (void * __P, unsigned long long __A)
  38. {
  39. __builtin_ia32_directstoreu_u64 ((unsigned long long *)__P, __A);
  40. }
  41. #endif
  42. #ifdef __DISABLE_MOVDIRI__
  43. #undef __DISABLE_MOVDIRI__
  44. #pragma GCC pop_options
  45. #endif /* __DISABLE_MOVDIRI__ */
  46. #ifndef __MOVDIR64B__
  47. #pragma GCC push_options
  48. #pragma GCC target ("movdir64b")
  49. #define __DISABLE_MOVDIR64B__
  50. #endif /* __MOVDIR64B__ */
  51. extern __inline void
  52. __attribute__((__gnu_inline__, __always_inline__, __artificial__))
  53. _movdir64b (void * __P, const void * __Q)
  54. {
  55. __builtin_ia32_movdir64b (__P, __Q);
  56. }
  57. #ifdef __DISABLE_MOVDIR64B__
  58. #undef __DISABLE_MOVDIR64B__
  59. #pragma GCC pop_options
  60. #endif /* __DISABLE_MOVDIR64B__ */
  61. #endif /* _MOVDIRINTRIN_H_INCLUDED. */