ifunc-memset.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /* memset variant information on S/390 version.
  2. Copyright (C) 2018-2026 Free Software Foundation, Inc.
  3. This file is part of the GNU C Library.
  4. The GNU C Library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Lesser General Public
  6. License as published by the Free Software Foundation; either
  7. version 2.1 of the License, or (at your option) any later version.
  8. The GNU C Library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public
  13. License along with the GNU C Library; if not, see
  14. <https://www.gnu.org/licenses/>. */
  15. #if defined USE_MULTIARCH && IS_IN (libc) \
  16. && ! defined HAVE_S390_MIN_Z196_ZARCH_ASM_SUPPORT
  17. # define HAVE_MEMSET_IFUNC 1
  18. #else
  19. # define HAVE_MEMSET_IFUNC 0
  20. #endif
  21. #if defined HAVE_S390_MIN_Z196_ZARCH_ASM_SUPPORT
  22. # define MEMSET_DEFAULT MEMSET_Z196
  23. # define HAVE_MEMSET_Z900_G5 0
  24. # define HAVE_MEMSET_Z10 0
  25. # define HAVE_MEMSET_Z196 1
  26. #elif defined HAVE_S390_MIN_Z10_ZARCH_ASM_SUPPORT
  27. # define MEMSET_DEFAULT MEMSET_Z10
  28. # define HAVE_MEMSET_Z900_G5 0
  29. # define HAVE_MEMSET_Z10 1
  30. # define HAVE_MEMSET_Z196 HAVE_MEMSET_IFUNC
  31. #else
  32. # define MEMSET_DEFAULT MEMSET_Z900_G5
  33. # define HAVE_MEMSET_Z900_G5 1
  34. # define HAVE_MEMSET_Z10 HAVE_MEMSET_IFUNC
  35. # define HAVE_MEMSET_Z196 HAVE_MEMSET_IFUNC
  36. #endif
  37. #if HAVE_MEMSET_Z10 || HAVE_MEMSET_Z196
  38. # define HAVE_MEMSET_MVCLE 1
  39. #else
  40. # define HAVE_MEMSET_MVCLE 0
  41. #endif
  42. #if HAVE_MEMSET_Z900_G5
  43. # define MEMSET_Z900_G5 __memset_default
  44. #else
  45. # define MEMSET_Z900_G5 NULL
  46. #endif
  47. #if HAVE_MEMSET_Z10
  48. # define MEMSET_Z10 __memset_z10
  49. #else
  50. # define MEMSET_Z10 NULL
  51. #endif
  52. #if HAVE_MEMSET_Z196
  53. # define MEMSET_Z196 __memset_z196
  54. #else
  55. # define MEMSET_Z196 NULL
  56. #endif