| 56 | } |
| 57 | |
| 58 | void 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 | |
| 75 | void writeI53ToU64Clamped_double(uint64_t *heapAddress, double num) { |
| 76 | #ifdef GENERATE_ANSWERS |