MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / writeI53ToI64Signaling_double

Function writeI53ToI64Signaling_double

test/core/test_int53.c:58–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58void writeI53ToI64Signaling_double(int64_t *heapAddress, double num) {
59#ifdef GENERATE_ANSWERS
60 if (num <= -9223372036854775808.0 || num >= 9223372036854775808.0) {
61 *heapAddress = 0x0102030401020304ULL;
62 } else {
63 *heapAddress = (int64_t)num;
64 }
65#else
66 EM_ASM(try {
67 writeI53ToI64Signaling($0, $1)
68 } catch(e) {
69 HEAPU32[($0) / 4] = 0x01020304;
70 HEAPU32[($0+4) / 4] = 0x01020304;
71 }, heapAddress, num);
72#endif
73}
74
75void writeI53ToU64Clamped_double(uint64_t *heapAddress, double num) {
76#ifdef GENERATE_ANSWERS

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected