nasm-macros.c 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /* This file auto-generated from standard.mac by genmacro.c - don't edit it */
  2. #include <stddef.h>
  3. static const char *nasm_standard_mac[] = {
  4. "%define __FILE__",
  5. "%define __LINE__",
  6. "%define __SECT__ [section .text]",
  7. "%imacro section 1+.nolist",
  8. "%define __SECT__ [section %1]",
  9. "__SECT__",
  10. "%endmacro",
  11. "%imacro segment 1+.nolist",
  12. "%define __SECT__ [segment %1]",
  13. "__SECT__",
  14. "%endmacro",
  15. "%imacro absolute 1+.nolist",
  16. "%define __SECT__ [absolute %1]",
  17. "__SECT__",
  18. "%endmacro",
  19. "%imacro struc 1-2.nolist 0",
  20. "%push struc",
  21. "%define %$strucname %1",
  22. "[absolute %2]",
  23. "%$strucname:",
  24. "%endmacro",
  25. "%imacro endstruc 0.nolist",
  26. "%{$strucname}_size EQU $ - %$strucname",
  27. "%pop",
  28. "__SECT__",
  29. "%endmacro",
  30. "%imacro istruc 1.nolist",
  31. "%push istruc",
  32. "%define %$strucname %1",
  33. "%$strucstart:",
  34. "%endmacro",
  35. "%imacro at 1-2+.nolist",
  36. "times %1-($-%$strucstart) db 0",
  37. "%2",
  38. "%endmacro",
  39. "%imacro iend 0.nolist",
  40. "times %{$strucname}_size-($-%$strucstart) db 0",
  41. "%pop",
  42. "%endmacro",
  43. "%imacro align 1-2+.nolist nop",
  44. "%ifidni %2,nop",
  45. "[align %1]",
  46. "%else",
  47. "times ($$-$) & ((%1)-1) %2",
  48. "%endif",
  49. "%endmacro",
  50. "%imacro alignb 1-2+.nolist resb 1",
  51. "times ($$-$) & ((%1)-1) %2",
  52. "%endmacro",
  53. "%imacro extern 1-*.nolist",
  54. "%rep %0",
  55. "[extern %1]",
  56. "%rotate 1",
  57. "%endrep",
  58. "%endmacro",
  59. "%imacro bits 1+.nolist",
  60. "[bits %1]",
  61. "%endmacro",
  62. "%imacro use16 0.nolist",
  63. "[bits 16]",
  64. "%endmacro",
  65. "%imacro use32 0.nolist",
  66. "[bits 32]",
  67. "%endmacro",
  68. "%imacro use64 0.nolist",
  69. "[bits 64]",
  70. "%endmacro",
  71. "%imacro global 1-*.nolist",
  72. "%rep %0",
  73. "[global %1]",
  74. "%rotate 1",
  75. "%endrep",
  76. "%endmacro",
  77. "%imacro common 1-*.nolist",
  78. "%rep %0",
  79. "[common %1]",
  80. "%rotate 1",
  81. "%endrep",
  82. "%endmacro",
  83. "%imacro cpu 1+.nolist",
  84. "[cpu %1]",
  85. "%endmacro",
  86. "%imacro default 1+.nolist",
  87. "[default %1]",
  88. "%endmacro",
  89. "%define __OUTPUT_FORMAT__ __YASM_OBJFMT__",
  90. NULL
  91. };