i_wasm.pas 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. {
  2. Copyright (c) 2019 by Dmitry Boyarintsev
  3. This unit implements support information structures for WebAssembly
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program 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
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  15. ****************************************************************************
  16. }
  17. unit i_wasm;
  18. {$i fpcdefs.inc}
  19. interface
  20. uses
  21. systems,rescmn;
  22. const
  23. res_wasmraw_info : tresinfo =
  24. (
  25. id : res_none; // todo: not implemented. but could be as memory
  26. resbin : 'fpcwasmres';
  27. rescmd : '-o $OBJ $DBG';
  28. rcbin : '';
  29. rccmd : '';
  30. resourcefileclass : nil;
  31. resflags : [res_no_compile];
  32. );
  33. system_wasm_info : tsysteminfo =
  34. (
  35. system : system_wasm_wasm32;
  36. name : 'WebAssembly';
  37. shortname : 'Wasm';
  38. flags : [tf_files_case_sensitive,tf_no_generic_stackcheck,
  39. { avoid the creation of threadvar tables }
  40. tf_section_threadvars];
  41. cpu : cpu_wasm;
  42. unit_env : '';
  43. extradefines : '';
  44. exeext : '';
  45. defext : '.def';
  46. scriptext : '.sh';
  47. smartext : '.sl';
  48. unitext : '.ppu';
  49. unitlibext : '.ppl';
  50. asmext : '.wat';
  51. objext : '.wasm';
  52. resext : '';
  53. resobjext : '.wasm';
  54. sharedlibext : '.wasm';
  55. staticlibext : '.wasm';
  56. staticlibprefix : '';
  57. sharedlibprefix : '';
  58. sharedClibext : '.wasm';
  59. staticClibext : '.wasm';
  60. staticClibprefix : '';
  61. sharedClibprefix : '';
  62. importlibprefix : '';
  63. importlibext : '.wasm';
  64. Cprefix : '';
  65. newline : #10;
  66. dirsep : '/';
  67. assem : as_wasm_wabt;
  68. assemextern : as_wasm_binaryen;
  69. link : ld_none;
  70. linkextern : ld_none; // there's no linker, only object files for WASM
  71. ar : ar_none;
  72. res : res_none;
  73. dbg : dbg_none;
  74. script : script_unix;
  75. endian : endian_little;
  76. alignment :
  77. (
  78. procalign : 4;
  79. loopalign : 4;
  80. jumpalign : 0;
  81. jumpalignskipmax : 0;
  82. coalescealign : 0;
  83. coalescealignskipmax: 0;
  84. constalignmin : 0;
  85. constalignmax : 4;
  86. varalignmin : 4;
  87. varalignmax : 4;
  88. localalignmin : 4;
  89. localalignmax : 4;
  90. recordalignmin : 0;
  91. recordalignmax : 2;
  92. maxCrecordalign : 4
  93. );
  94. first_parm_offset : 0;
  95. stacksize : 262144;
  96. stackalign : 4;
  97. abi : abi_default;
  98. llvmdatalayout : 'todo';
  99. );
  100. implementation
  101. end.