| 865 | } |
| 866 | |
| 867 | void fxFromBigInt64(txMachine* the, txSlot* slot, txS8 it) |
| 868 | { |
| 869 | txU1 sign = 0; |
| 870 | txU8 value = 0; |
| 871 | if (it < 0) { |
| 872 | if (it & 0x7FFFFFFFFFFFFFFFll) |
| 873 | value = -it; |
| 874 | else |
| 875 | value = (txU8)it; |
| 876 | sign = 1; |
| 877 | } |
| 878 | else |
| 879 | value = it; |
| 880 | if (value > 0x00000000FFFFFFFFll) { |
| 881 | slot->value.bigint.data = fxNewChunk(the, 2 * sizeof(txU4)); |
| 882 | slot->value.bigint.data[0] = (txU4)value; |
| 883 | slot->value.bigint.data[1] = (txU4)(value >> 32); |
| 884 | slot->value.bigint.size = 2; |
| 885 | } |
| 886 | else { |
| 887 | slot->value.bigint.data = fxNewChunk(the, sizeof(txU4)); |
| 888 | slot->value.bigint.data[0] = (txU4)value; |
| 889 | slot->value.bigint.size = 1; |
| 890 | } |
| 891 | slot->value.bigint.sign = sign; |
| 892 | slot->kind = XS_BIGINT_KIND; |
| 893 | } |
| 894 | |
| 895 | void fxFromBigUint64(txMachine* the, txSlot* slot, txU8 value) |
| 896 | { |
no test coverage detected