| 86 | } |
| 87 | |
| 88 | void writeI53ToU64Signaling_double(uint64_t *heapAddress, double num) { |
| 89 | #ifdef GENERATE_ANSWERS |
| 90 | if (num < 0 || num >= 18446744073709551616.0) { |
| 91 | *heapAddress = 0x0102030401020304ULL; |
| 92 | } else { |
| 93 | *heapAddress = (uint64_t)num; |
| 94 | } |
| 95 | #else |
| 96 | EM_ASM(try { |
| 97 | writeI53ToU64Signaling($0, $1) |
| 98 | } catch(e) { |
| 99 | HEAPU32[$0 / 4] = 0x01020304; |
| 100 | HEAPU32[($0+4) / 4] = 0x01020304; |
| 101 | } , heapAddress, num); |
| 102 | #endif |
| 103 | } |
| 104 | |
| 105 | int64_t readI53FromI64_toInt64(int64_t *heapAddress) { |
| 106 | #ifdef GENERATE_ANSWERS |