Skip to content

Commit

Permalink
fixup! jit(arm64): support for and, or, and xor
Browse files Browse the repository at this point in the history
  • Loading branch information
summerwind committed Feb 12, 2022
1 parent 59f6304 commit 04d6606
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion wasm/jit/jit_arm64.go
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,15 @@ func (c *arm64Compiler) compileXor(o *wazeroir.OperationXor) error {
destinationReg = x2.register
}

c.applyTwoRegistersToRegisterInstruction(arm64.AEOR, x2.register, x1.register, destinationReg)
var inst obj.As
switch o.Type {
case wazeroir.UnsignedInt32:
inst = arm64.AEORW
case wazeroir.UnsignedInt64:
inst = arm64.AEOR
}

c.applyTwoRegistersToRegisterInstruction(inst, x2.register, x1.register, destinationReg)
c.locationStack.pushValueLocationOnRegister(destinationReg)
return nil
}
Expand Down

0 comments on commit 04d6606

Please sign in to comment.