Updates to 32-bit codegen #481

Merged
sb10q merged 1 commits from fix/32bit-codegen-issues into master 2024-08-17 17:37:21 +08:00
Collaborator

Addresses remaining comments for #477.

Addresses remaining comments for #477.
derppening requested review from sb10q 2024-07-29 13:27:12 +08:00
Owner

These changes from #477 would need to be reverted as well
image

These changes from #477 would need to be reverted as well ![image](/attachments/44ec6b09-fd57-4ed1-92f8-a9b45ffffaa3)
Owner

Thought the compiler had to be changed as well?
Or does it work right now just because x86 is little endian?

Thought the compiler had to be changed as well? Or does it work right now just because x86 is little endian?
derppening force-pushed fix/32bit-codegen-issues from 9d64b2ea7d to 318a675ea6 2024-07-29 14:59:26 +08:00 Compare
Author
Collaborator

These changes from #477 would need to be reverted as well
image

Done.

Thought the compiler had to be changed as well?
Or does it work right now just because x86 is little endian?

I quickly figured that while some parts of the compiler (e.g. range) is defined using 32-bit ints instead of size_t, list and str has used size_t since forever. I think they continue to work when I (erroneously) switched to uint32_t because the upper 32 bits are unused and is zeroed.

> These changes from #477 would need to be reverted as well > ![image](/attachments/44ec6b09-fd57-4ed1-92f8-a9b45ffffaa3) Done. > Thought the compiler had to be changed as well? > Or does it work right now just because x86 is little endian? I quickly figured that while some parts of the compiler (e.g. `range`) is defined using 32-bit ints instead of `size_t`, `list` and `str` has used `size_t` since forever. I think they continue to work when I (erroneously) switched to `uint32_t` because the upper 32 bits are unused and is zeroed.
Owner

Half that memory may be uninitialized and also this will break on any big-endian architecture (not that there are many left out there).

Half that memory may be uninitialized and also this will break on any big-endian architecture (not that there are many left out there).
sb10q merged commit 318a675ea6 into master 2024-07-29 15:05:05 +08:00
sb10q deleted branch fix/32bit-codegen-issues 2024-07-29 15:05:05 +08:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/nac3#481
No description provided.