Skip to content

Commit

Permalink
Fix dynamic tests, bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikMcClure committed Jun 16, 2020
1 parent c0011f0 commit 36e228b
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 21 deletions.
2 changes: 1 addition & 1 deletion include/innative/innative.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ limitations under the License.

#define INNATIVE_VERSION_MAJOR 0
#define INNATIVE_VERSION_MINOR 1
#define INNATIVE_VERSION_REVISION 7
#define INNATIVE_VERSION_REVISION 8
#define INNATIVE_WASM_MAGIC_COOKIE 0x6d736100
#define INNATIVE_WASM_MAGIC_VERSION 0x01
#define INNATIVE_VERSION(v, m, r, b) (((v | 0ULL) << 48) | ((m | 0ULL) << 32) | ((r | 0ULL) << 16) | (b | 0ULL))
Expand Down
4 changes: 2 additions & 2 deletions innative-env/chkstk.amd64.asm
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
PUBLIC __chkstk_ms
PUBLIC __alloca_probe
PUBLIC __alloca_probe_stub

_TEXT SEGMENT

__chkstk_ms:
__alloca_probe:
__alloca_probe_stub:

PUSH R10
PUSH R11
Expand Down
26 changes: 13 additions & 13 deletions innative-env/chkstk.x86.asm
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
;-----------------------------------------------------------------------------
.386
_TEXT segment use32 para public 'CODE'
public __chkstk_ms
public __alloca_probe
public __alloca_probe_8
public __alloca_probe_16
public ___chkstk_ms
public __alloca_probe_stub
public __alloca_probe_8_stub
public __alloca_probe_16_stub
PAGESIZE equ 4096

__chkstk_ms proc near
___chkstk_ms proc near
assume cs:_TEXT

__alloca_probe = __chkstk_ms
__alloca_probe_stub = ___chkstk_ms

cmp eax, PAGESIZE ; more than one page?
jae short probesetup ; yes, go setup probe loop
Expand Down Expand Up @@ -59,9 +59,9 @@ lastpage:
; ...probe in case a page was crossed
ret

__chkstk_ms endp
___chkstk_ms endp

__alloca_probe_16 proc ; 16 byte aligned alloca
__alloca_probe_16_stub proc ; 16 byte aligned alloca

push ecx
lea ecx, [esp] + 8 ; TOS before entering this function
Expand All @@ -71,11 +71,11 @@ __alloca_probe_16 proc ; 16 byte aligned alloca
sbb ecx, ecx ; ecx = 0xFFFFFFFF if size wrapped around
or eax, ecx ; cap allocation size on wraparound
pop ecx ; Restore ecx
jmp __chkstk_ms
jmp ___chkstk_ms

__alloca_probe_16 endp
__alloca_probe_16_stub endp

__alloca_probe_8 proc ; 8 byte aligned alloca
__alloca_probe_8_stub proc ; 8 byte aligned alloca

push ecx
lea ecx, [esp] + 8 ; TOS before entering this function
Expand All @@ -85,9 +85,9 @@ __alloca_probe_8 proc ; 8 byte aligned alloca
sbb ecx, ecx ; ecx = 0xFFFFFFFF if size wrapped around
or eax, ecx ; cap allocation size on wraparound
pop ecx ; Restore ecx
jmp __chkstk_ms
jmp ___chkstk_ms

__alloca_probe_8 endp
__alloca_probe_8_stub endp

_TEXT ends
end
5 changes: 5 additions & 0 deletions innative-env/wait_list.c
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,13 @@ static void* grow_array(void* array, size_t elem_size, size_t new_count)

static void free_array(void* array) { HeapFree(GetProcessHeap(), 0, array); }

#ifdef _WIN64
static size_t in_atomic_incr(size_t* value) { return InterlockedExchangeAdd64(value, 1) + 1; }
static size_t in_atomic_decr(size_t* value) { return InterlockedExchangeAdd64(value, -1) - 1; }
#else
static size_t in_atomic_incr(size_t* value) { return InterlockedExchangeAdd(value, 1) + 1; }
static size_t in_atomic_decr(size_t* value) { return InterlockedExchangeAdd(value, -1) - 1; }
#endif

#elif defined(IN_PLATFORM_POSIX)

Expand Down
2 changes: 1 addition & 1 deletion innative-runtime-setup/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<?error Unknown value for Platform variable ?>
<?endif ?>

<?define Version="0.1.7" ?>
<?define Version="0.1.8" ?>
<Product
Id="74E8CCF9-5FC8-42DF-A446-544070822BA0"
Name="inNative Runtime v$(var.Version)"
Expand Down
2 changes: 1 addition & 1 deletion innative-sdk-setup/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<?error Unknown value for Platform variable ?>
<?endif ?>

<?define Version="0.1.7" ?>
<?define Version="0.1.8" ?>
<Product
Id="85E25DCB-0ADE-496F-81E0-265D29C1AC3B"
Name="inNative SDK v$(var.Version)"
Expand Down
1 change: 1 addition & 0 deletions innative/link.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ IN_ERROR innative::LinkEnvironment(const Environment* env, const path& file)
#elif defined(IN_CPU_x86)
"/MACHINE:X86",
"/LARGEADDRESSAWARE",
"/SAFESEH:NO",
#elif defined(IN_CPU_ARM) || defined(IN_CPU_ARM64)
"/MACHINE:ARM",
#endif
Expand Down
4 changes: 2 additions & 2 deletions innative/utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ namespace innative {
std::pair<Module*, Export*> ResolveTrueExport(const Environment& env, const Import& imp);
Import* ResolveImport(const Module& m, const Export& imp);
path GetProgramPath(const char* arg0);
path GetWorkingDir();
bool SetWorkingDir(const path& path);
IN_COMPILER_DLLEXPORT path GetWorkingDir();
IN_COMPILER_DLLEXPORT bool SetWorkingDir(const path& path);
path GetAbsolutePath(const path& path);
inline path GetPath(const char* utf8) { return u8path(!utf8 ? "" : utf8); }
IN_COMPILER_DLLEXPORT void GetCPUInfo(uintcpuinfo& info, int flags);
Expand Down
2 changes: 1 addition & 1 deletion spec
Submodule spec updated 102 files

0 comments on commit 36e228b

Please sign in to comment.