Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,7 @@ jobs:
test_targets: "
wasm64
wasm64_4gb.test_hello_world
wasm64_4gb.test_em_asm
wasm64l.test_bigswitch
other.test_memory64_proxies
other.test_failing_growth_wasm64"
Expand Down
19 changes: 9 additions & 10 deletions src/library.js
Original file line number Diff line number Diff line change
Expand Up @@ -2869,7 +2869,6 @@ addToLibrary({
var ch;
// Most arguments are i32s, so shift the buffer pointer so it is a plain
// index into HEAP32.
buf >>= 2;
while (ch = HEAPU8[sigPtr++]) {
#if ASSERTIONS
var chr = String.fromCharCode(ch);
Expand All @@ -2885,22 +2884,22 @@ addToLibrary({
#endif
assert(validChars.includes(chr), `Invalid character ${ch}("${chr}") in readEmAsmArgs! Use only [${validChars}], and do not specify "v" for void return argument.`);
#endif
// Floats are always passed as doubles, and doubles and int64s take up 8
// bytes (two 32-bit slots) in memory, align reads to these:
buf += (ch != {{{ charCode('i') }}}) & buf;
// Floats are always passed as doubles, so all types except for 'i'
// are 8 bytes and require alignment.
buf += (ch != {{{ charCode('i') }}}) && buf % 8 ? 4 : 0;
readEmAsmArgsArray.push(
ch == {{{ charCode('i') }}} ? HEAP32[buf] :
#if MEMORY64
// Special case for pointers under wasm64 which we read as int53 Numbers.
ch == {{{ charCode('p') }}} ? {{{ makeGetValue('buf++ << 2', 0, '*') }}} :
ch == {{{ charCode('p') }}} ? {{{ makeGetValue('buf', 0, '*') }}} :
#endif
#if WASM_BIGINT
(ch == {{{ charCode('j') }}} ? HEAP64 : HEAPF64)[buf++ >> 1]
#else
HEAPF64[buf++ >> 1]
ch == {{{ charCode('j') }}} ? {{{ makeGetValue('buf', 0, 'i64') }}} :
#endif
ch == {{{ charCode('i') }}} ?
{{{ makeGetValue('buf', 0, 'i32') }}} :
{{{ makeGetValue('buf', 0, 'double') }}}
);
++buf;
buf += ch == {{{ charCode('i') }}} ? 4 : 8;
}
return readEmAsmArgsArray;
},
Expand Down
2 changes: 1 addition & 1 deletion test/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ def load_test_suites(args, modules):
for test in tests:
suite.addTest(test)
suites.append((m.__name__, suite))
if total_tests == 1:
if total_tests == 1 or parallel_testsuite.num_cores() == 1:
common.EMTEST_SAVE_DIR = True
return suites, unmatched_test_names

Expand Down