Commit add6f455 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

extmod/moductypes: set_aligned(): Handle INT64/UINT64.

parent 7a99639c
......@@ -359,6 +359,15 @@ STATIC void set_aligned(uint val_type, void *p, mp_int_t index, mp_obj_t val) {
((uint32_t*)p)[index] = (uint32_t)v; return;
case INT32:
((int32_t*)p)[index] = (int32_t)v; return;
case INT64:
case UINT64:
if (sizeof(mp_int_t) == 8) {
((uint64_t*)p)[index] = (uint64_t)v;
} else {
// TODO: Doesn't offer atomic store semantics, but should at least try
set_unaligned(val_type, p, MP_ENDIANNESS_BIG, val);
}
return;
default:
assert(0);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment