ESP IDF fixes (#927)

Various fixes and beautifications coordinated with @1c3t3a,
fixes 2 of the 3 all remaining issues from #892:
- enable to os_mmap executable memory
- fix os_malloc/os_realloc/os_free issues
- implement os_thread_get_stack_boundary
- add build scripts to include with esp-idf to use wamr as
  an ESP-IDF component
- update sample and document
This commit is contained in:
Stefan Wallentowitz
2022-01-05 05:50:17 +01:00
committed by GitHub
parent 2c3f284b85
commit 78414b627c
17 changed files with 345 additions and 196 deletions

View File

@ -112,7 +112,7 @@ put_imm16_to_addr(int16 imm16, int16 *addr)
if ((intptr_t)addr % 4 != 3) {
*(int32 *)bytes = *addr_aligned1;
*(int16 *)(bytes + ((intptr_t)addr % 4)) = imm16;
memcpy(addr_aligned1, bytes, 4);
*addr_aligned1 = *(int32 *)bytes;
}
else {
addr_aligned2 = (int32 *)(((intptr_t)addr + 3) & ~3);