JitCompilerX86-static.S 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. ;# Copyright (c) 2018 tevador
  2. ;#
  3. ;# This file is part of RandomX.
  4. ;#
  5. ;# RandomX is free software: you can redistribute it and/or modify
  6. ;# it under the terms of the GNU General Public License as published by
  7. ;# the Free Software Foundation, either version 3 of the License, or
  8. ;# (at your option) any later version.
  9. ;#
  10. ;# RandomX is distributed in the hope that it will be useful,
  11. ;# but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ;# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ;# GNU General Public License for more details.
  14. ;#
  15. ;# You should have received a copy of the GNU General Public License
  16. ;# along with RandomX. If not, see<http://www.gnu.org/licenses/>.
  17. .intel_syntax noprefix
  18. #if defined(__APPLE__)
  19. .text
  20. #else
  21. .section .text
  22. #endif
  23. #if defined(__WIN32__) || defined(__APPLE__)
  24. #define DECL(x) _##x
  25. #else
  26. #define DECL(x) x
  27. #endif
  28. .global DECL(randomx_program_prologue)
  29. .global DECL(randomx_program_begin)
  30. .global DECL(randomx_program_epilogue)
  31. .global DECL(randomx_program_read)
  32. .global DECL(randomx_program_end)
  33. .global DECL(randomx_program_transform)
  34. #define db .byte
  35. .align 64
  36. DECL(randomx_program_prologue):
  37. #include "asm/program_prologue_linux.inc"
  38. .align 64
  39. DECL(randomx_program_begin):
  40. nop
  41. .align 64
  42. DECL(randomx_program_epilogue):
  43. #include "asm/program_epilogue_linux.inc"
  44. .align 64
  45. DECL(randomx_program_read):
  46. #include "asm/program_read.inc"
  47. .align 64
  48. DECL(randomx_program_end):
  49. nop
  50. .align 8
  51. DECL(randomx_program_transform):
  52. #include "asm/program_transform_address.inc"