aboutsummaryrefslogtreecommitdiff
path: root/extmod/moductypes.c
diff options
context:
space:
mode:
Diffstat (limited to 'extmod/moductypes.c')
-rw-r--r--extmod/moductypes.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/extmod/moductypes.c b/extmod/moductypes.c
index 559339a7a..445808d3d 100644
--- a/extmod/moductypes.c
+++ b/extmod/moductypes.c
@@ -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);
}