asminit.def 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /* asminit.def --
  2. This file is part of the LZO real-time data compression library.
  3. Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer
  4. All Rights Reserved.
  5. The LZO library is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU General Public License as
  7. published by the Free Software Foundation; either version 2 of
  8. the License, or (at your option) any later version.
  9. The LZO library is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with the LZO library; see the file COPYING.
  15. If not, write to the Free Software Foundation, Inc.,
  16. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  17. Markus F.X.J. Oberhumer
  18. <markus@oberhumer.com>
  19. http://www.oberhumer.com/opensource/lzo/
  20. */
  21. #ifndef NAME1
  22. #if (defined(__MACH__) && defined(__APPLE__))
  23. # define NAME1(a) _ ## a
  24. #else
  25. # define NAME1(a) _ ## a
  26. # define NAME2(a) a
  27. #endif
  28. #endif
  29. #ifndef LZO_PP_CONCAT2
  30. # define LZO_PP_CONCAT2(a,b) a ## b
  31. #endif
  32. #ifndef p2align
  33. # define p2align(a) .p2align a
  34. #endif
  35. #ifndef globalf
  36. # define globalf(a) .globl a
  37. #endif
  38. #ifndef hiddenf
  39. # if defined(__ELF__)
  40. # define hiddenf(a) .hidden a
  41. # elif (defined(__MACH__) && defined(__APPLE__))
  42. # define hiddenf(a) .private_extern a
  43. # else
  44. # define hiddenf(a)
  45. # endif
  46. #endif
  47. #ifndef typef
  48. # if defined(__ELF__)
  49. # define typef(a) .type a,@function
  50. # else
  51. # define typef(a)
  52. # endif
  53. #endif
  54. #ifndef sizef
  55. # if defined(__ELF__)
  56. # define sizef(a,b) .size a,b
  57. # else
  58. # define sizef(a,b)
  59. # endif
  60. #endif
  61. #if defined(__ELF__)
  62. .section .note.GNU-stack,"",@progbits
  63. #endif
  64. .text
  65. #if defined(_WIN32) || defined(__WIN32__)
  66. # if defined(LZO_WIN32_FEAT_00)
  67. # LZO_WIN32_FEAT_00
  68. # else
  69. #if defined(__GNUC__) && !defined(__clang__)
  70. .globl @feat.00
  71. #endif
  72. @feat.00 = 1
  73. # endif
  74. #endif
  75. #if defined(__ELF__) || (defined(__MACH__) && defined(__APPLE__)) || defined(_WIN32) || defined(__WIN32__) || defined(_WIN64) || defined(__WIN64__)
  76. p2align(6)
  77. #else
  78. p2align(4)
  79. #endif
  80. #ifndef db
  81. # define db .byte
  82. #endif