ec_multibinary.asm 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ; Copyright(c) 2011-2015 Intel Corporation All rights reserved.
  3. ;
  4. ; Redistribution and use in source and binary forms, with or without
  5. ; modification, are permitted provided that the following conditions
  6. ; are met:
  7. ; * Redistributions of source code must retain the above copyright
  8. ; notice, this list of conditions and the following disclaimer.
  9. ; * Redistributions in binary form must reproduce the above copyright
  10. ; notice, this list of conditions and the following disclaimer in
  11. ; the documentation and/or other materials provided with the
  12. ; distribution.
  13. ; * Neither the name of Intel Corporation nor the names of its
  14. ; contributors may be used to endorse or promote products derived
  15. ; from this software without specific prior written permission.
  16. ;
  17. ; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  18. ; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  19. ; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  20. ; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  21. ; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  22. ; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  23. ; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  24. ; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  25. ; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  26. ; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  27. ; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  28. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  29. %include "reg_sizes.asm"
  30. %include "multibinary.asm"
  31. %ifidn __OUTPUT_FORMAT__, elf32
  32. [bits 32]
  33. %else
  34. default rel
  35. [bits 64]
  36. extern ec_encode_data_update_sse
  37. extern ec_encode_data_update_avx
  38. extern ec_encode_data_update_avx2
  39. %ifdef HAVE_AS_KNOWS_AVX512
  40. extern ec_encode_data_avx512
  41. extern gf_vect_dot_prod_avx512
  42. extern ec_encode_data_update_avx512
  43. extern gf_vect_mad_avx512
  44. %endif
  45. extern gf_vect_mul_sse
  46. extern gf_vect_mul_avx
  47. extern gf_vect_mad_sse
  48. extern gf_vect_mad_avx
  49. extern gf_vect_mad_avx2
  50. %endif
  51. extern gf_vect_mul_base
  52. extern ec_encode_data_base
  53. extern ec_encode_data_update_base
  54. extern gf_vect_dot_prod_base
  55. extern gf_vect_mad_base
  56. extern gf_vect_dot_prod_sse
  57. extern gf_vect_dot_prod_avx
  58. extern gf_vect_dot_prod_avx2
  59. extern ec_encode_data_sse
  60. extern ec_encode_data_avx
  61. extern ec_encode_data_avx2
  62. mbin_interface ec_encode_data
  63. mbin_interface gf_vect_dot_prod
  64. mbin_interface gf_vect_mul
  65. mbin_interface ec_encode_data_update
  66. mbin_interface gf_vect_mad
  67. %ifidn __OUTPUT_FORMAT__, elf32
  68. mbin_dispatch_init5 ec_encode_data, ec_encode_data_base, ec_encode_data_sse, ec_encode_data_avx, ec_encode_data_avx2
  69. mbin_dispatch_init5 gf_vect_dot_prod, gf_vect_dot_prod_base, gf_vect_dot_prod_sse, gf_vect_dot_prod_avx, gf_vect_dot_prod_avx2
  70. mbin_dispatch_init2 gf_vect_mul, gf_vect_mul_base
  71. mbin_dispatch_init2 ec_encode_data_update, ec_encode_data_update_base
  72. mbin_dispatch_init2 gf_vect_mad, gf_vect_mad_base
  73. %else
  74. mbin_dispatch_init5 gf_vect_mul, gf_vect_mul_base, gf_vect_mul_sse, gf_vect_mul_avx, gf_vect_mul_avx
  75. mbin_dispatch_init6 ec_encode_data, ec_encode_data_base, ec_encode_data_sse, ec_encode_data_avx, ec_encode_data_avx2, ec_encode_data_avx512
  76. mbin_dispatch_init6 ec_encode_data_update, ec_encode_data_update_base, ec_encode_data_update_sse, ec_encode_data_update_avx, ec_encode_data_update_avx2, ec_encode_data_update_avx512
  77. mbin_dispatch_init6 gf_vect_mad, gf_vect_mad_base, gf_vect_mad_sse, gf_vect_mad_avx, gf_vect_mad_avx2, gf_vect_mad_avx512
  78. mbin_dispatch_init6 gf_vect_dot_prod, gf_vect_dot_prod_base, gf_vect_dot_prod_sse, gf_vect_dot_prod_avx, gf_vect_dot_prod_avx2, gf_vect_dot_prod_avx512
  79. %endif
  80. ;;; func core, ver, snum
  81. slversion ec_encode_data, 00, 06, 0133
  82. slversion gf_vect_mul, 00, 05, 0134
  83. slversion ec_encode_data_update, 00, 05, 0212
  84. slversion gf_vect_dot_prod, 00, 05, 0138
  85. slversion gf_vect_mad, 00, 04, 0213