Commit Graph

61778 Commits

Author SHA1 Message Date
nickysn
04828b22f6 * WASI API consts, types and procs moved to separate include files
git-svn-id: branches/wasm@48351 -
2021-01-23 15:19:21 +00:00
nickysn
5dd7e116ce + added header comment with copyright and license info to the WASI system unit
git-svn-id: branches/wasm@48350 -
2021-01-23 14:56:23 +00:00
nickysn
6f20e32ddd + added argc and argv (not yet initialized), so that unit objpas compiles
git-svn-id: branches/wasm@48347 -
2021-01-23 07:34:09 +00:00
nickysn
a277228b57 + also attempt to compile objpas in the WASI makefiles
git-svn-id: branches/wasm@48346 -
2021-01-23 07:31:30 +00:00
nickysn
6350401d4c + debug output in the WASM directory functions
git-svn-id: branches/wasm@48345 -
2021-01-23 07:24:41 +00:00
nickysn
a28eb39f4b + implemented WASI file close
git-svn-id: branches/wasm@48344 -
2021-01-23 07:04:32 +00:00
nickysn
8e2e31f95c * memory.grow returns the previous memory size in pages, so we don't need to ask for the size first in SysOSAlloc
git-svn-id: branches/wasm@48343 -
2021-01-23 06:40:45 +00:00
nickysn
a6d332d092 - removed the heap alloc/free function debug output
git-svn-id: branches/wasm@48342 -
2021-01-23 06:37:22 +00:00
nickysn
0077b16cc3 * pass 3 as fd for path_open
git-svn-id: branches/wasm@48341 -
2021-01-23 06:15:19 +00:00
nickysn
594be1be04 * properly handle reference with negative offsets
git-svn-id: branches/wasm@48340 -
2021-01-23 05:27:32 +00:00
nickysn
fb29456a0a * fixed parameter of DebugWriteHexLongWord
git-svn-id: branches/wasm@48339 -
2021-01-23 05:00:21 +00:00
nickysn
b35d3c5f3a * don't override inittempvariables for WebAssembly, because things like
ansistrings actually need to be initialized to zero on proc entry

git-svn-id: branches/wasm@48338 -
2021-01-23 04:42:52 +00:00
nickysn
f891c52dd1 - removed tarrayreftype, because it's not used on the wasm target
git-svn-id: branches/wasm@48336 -
2021-01-22 21:47:08 +00:00
nickysn
f294ea5028 - removed commented out code from aasmcpu.pas
git-svn-id: branches/wasm@48335 -
2021-01-22 18:23:15 +00:00
nickysn
fe7c14a2c0 * synchronized with trunk
git-svn-id: branches/wasm@48334 -
2021-01-22 16:37:32 +00:00
nickysn
1003d6499f * formatting
git-svn-id: branches/wasm@48333 -
2021-01-22 16:35:32 +00:00
nickysn
9e95895a9b * get rid of the internal error in thlcgwasm.a_cmp_ref_reg_stack by using swap_opcmp
git-svn-id: branches/wasm@48332 -
2021-01-22 16:31:31 +00:00
nickysn
5a84c4db61 - get rid of FRAME_POINTER_SYM and BASE_POINTER_SYM - they should not be used anymore
git-svn-id: branches/wasm@48331 -
2021-01-22 16:24:56 +00:00
nickysn
4d99fb3352 * allocate locals in a better way, so that we don't get 2 extra wasted locals per function
git-svn-id: branches/wasm@48330 -
2021-01-22 16:22:49 +00:00
nickysn
e0dffb1c2c * fixes to the type conversions in thlcgwasm.resize_stack_int_val
git-svn-id: branches/wasm@48329 -
2021-01-22 16:05:03 +00:00
nickysn
f03245e05c - get rid of maybe_adjust_cmp_stackval - it is unnecessary for WebAssembly,
because it has unsigned comparison instructions, unlike the JVM, and using it
  with the unsigned instructions even produced incorrect code

git-svn-id: branches/wasm@48328 -
2021-01-22 15:41:50 +00:00
nickysn
a9264cc608 - removed commented out method g_copyvalueparas
git-svn-id: branches/wasm@48327 -
2021-01-22 15:29:34 +00:00
nickysn
3a0d84fde2 - removed outdated comment from thlcgwasm.a_cmp_stack_stack
git-svn-id: branches/wasm@48326 -
2021-01-22 15:26:30 +00:00
nickysn
f3482acbf9 - removed commented out code from thlcgwasm.g_proc_entry
git-svn-id: branches/wasm@48325 -
2021-01-22 15:24:11 +00:00
nickysn
83f88e515b * renamed the a_get/set/tee_local/global asm ops a_local/global_set/get/tee
git-svn-id: branches/wasm@48324 -
2021-01-22 15:21:40 +00:00
nickysn
d8f55ebb48 * renamed the a_iXX_extendYYYY family of asm ops to their modern versions
git-svn-id: branches/wasm@48323 -
2021-01-22 15:08:43 +00:00
nickysn
116366a8e3 * updated the a_iXX_trunc_su_fYY asm ops to their modern format a_iXX_trunc_fYY_su
git-svn-id: branches/wasm@48322 -
2021-01-22 15:05:35 +00:00
nickysn
60242ca0fd * updated the a_fXX_convert_su_iYY asm ops to their modern format a_fXX_convert_iYY_su
git-svn-id: branches/wasm@48321 -
2021-01-22 15:03:04 +00:00
nickysn
9acfdc8cdd * the a_f64_reinterpret_f64 asm op renamed a_f64_reinterpret_i64
git-svn-id: branches/wasm@48320 -
2021-01-22 14:58:50 +00:00
nickysn
699626ee5c * a_grow_memory asm op renamed a_memory_grow
git-svn-id: branches/wasm@48319 -
2021-01-22 14:52:46 +00:00
nickysn
d0fe45a595 * a_current_memory asm op renamed a_memory_size
git-svn-id: branches/wasm@48318 -
2021-01-22 14:51:55 +00:00
pierre
1351ccb3bf Avoid range check errors
git-svn-id: trunk@48317 -
2021-01-22 12:51:53 +00:00
pierre
f28629e8e1 Only set FNotifyMainThreadEvent at start of Execute method and after finishing the compilation of a package
git-svn-id: trunk@48316 -
2021-01-22 08:57:56 +00:00
nickysn
a329325217 * THandle is a longint on the WASI target
git-svn-id: branches/wasm@48315 -
2021-01-22 04:09:51 +00:00
nickysn
14bca0d0dd - removed debug writeln from the WASI linker invocation code
git-svn-id: branches/wasm@48314 -
2021-01-22 03:11:08 +00:00
nickysn
cdb74f034c + call InitSystemThreads in the system unit startup for WASI
git-svn-id: branches/wasm@48313 -
2021-01-22 03:01:55 +00:00
nickysn
910bbc6b37 * override is_pushleftright for WebAssembly and make it return true
git-svn-id: branches/wasm@48312 -
2021-01-22 02:59:13 +00:00
nickysn
c8760b12d4 + initial attempt for implementing do_open. Not working yet
git-svn-id: branches/wasm@48311 -
2021-01-22 02:43:54 +00:00
nickysn
e14451c6b6 + added error handling to the do_read and do_Write WASI routines
git-svn-id: branches/wasm@48310 -
2021-01-22 02:06:30 +00:00
nickysn
85ea2b9b11 + added the WASI errno constants
git-svn-id: branches/wasm@48309 -
2021-01-22 01:35:12 +00:00
nickysn
9b173ac119 + implemented do_isdevice for WASI
git-svn-id: branches/wasm@48308 -
2021-01-22 01:26:35 +00:00
nickysn
d6038c5709 + implemented do_read for WASI
git-svn-id: branches/wasm@48307 -
2021-01-22 01:04:19 +00:00
nickysn
f585b2d846 + si_prc startup unit added to the makefiles
git-svn-id: branches/wasm@48306 -
2021-01-22 00:55:01 +00:00
nickysn
df947d3ae8 * fixed rtl compilation with FPC 3.2.0 starting compiler
git-svn-id: branches/wasm@48305 -
2021-01-22 00:48:44 +00:00
nickysn
f5f15e3dbf + added startup code for WASI
git-svn-id: branches/wasm@48304 -
2021-01-22 00:41:51 +00:00
nickysn
7f60637c92 - removed the system unit startup code debug output
git-svn-id: branches/wasm@48303 -
2021-01-22 00:31:16 +00:00
nickysn
204b0a777d + implemented system_exit for WASI
git-svn-id: branches/wasm@48302 -
2021-01-22 00:28:13 +00:00
nickysn
d8f2d85474 * switch to wasi_snapshot_preview1
git-svn-id: branches/wasm@48301 -
2021-01-22 00:19:10 +00:00
nickysn
8866fcbc56 - removed the FULL_RTL ifdefs, i.e. always build a full rtl
git-svn-id: branches/wasm@48300 -
2021-01-22 00:16:34 +00:00
nickysn
5794afac54 + implemented do_write for WASI. Error handling is not yet done.
git-svn-id: branches/wasm@48299 -
2021-01-22 00:15:01 +00:00