Skip to content

Commit

Permalink
Add comment to explain the change to I64ExtendI32U.
Browse files Browse the repository at this point in the history
  • Loading branch information
losfair committed May 11, 2020
1 parent 51e085a commit 6790702
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/singlepass-backend/src/codegen_x64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4052,6 +4052,9 @@ impl FunctionCodeGenerator<CodegenError> for X64FunctionCode {
loc,
ret,
);

// A 32-bit memory write does not automatically clear the upper 32 bits of a 64-bit word.
// So, we need to explicitly write zero to the upper half here.
if let Location::Memory(base, off) = ret {
Self::emit_relaxed_binop(
a,
Expand Down

0 comments on commit 6790702

Please sign in to comment.