Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lib/libint53.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ addToLibrary({
// function $writeI53ToU64(): the implementation would be identical, and it is up to the
// C/C++ side code to interpret the resulting number as signed or unsigned as is desirable.
$writeI53ToI64: (ptr, num) => {
{{{ makeSetValue('ptr', 0, 'num', 'u32') }}};
{{{ makeSetValue('ptr', 0, 'num&0xFFFFFFFF', 'u32') }}};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we normally write this as num >>> 0

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback. I'll see what I can do with the test and let you know!

var lower = {{{ makeGetValue('ptr', 0, 'u32') }}};
{{{ makeSetValue('ptr', 4, '(num - lower)/4294967296', 'u32') }}};
#if ASSERTIONS
Expand Down