Skip to content

Commit

Permalink
Remove unnecessary variable (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshklop committed Sep 12, 2023
1 parent 458945a commit 4342727
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pkg/vm/instruction.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,9 @@ func decodeInstructionValues(encoding uint64) (
) {
encodingWith2sComplement := encoding ^ 0x0000800080008000
// first, second and third 16 bits of the instruction encoding respectively
var mask uint64 = (1<<offsetBits - 1)
off0Enc = int16(encodingWith2sComplement & mask)
off1Enc = int16((encodingWith2sComplement >> offsetBits) & mask)
off2Enc = int16((encodingWith2sComplement >> (2 * offsetBits)) & mask)
off0Enc = int16(encodingWith2sComplement)
off1Enc = int16(encodingWith2sComplement >> offsetBits)
off2Enc = int16(encodingWith2sComplement >> (2 * offsetBits))
// bits 48..63
flags = uint16(encodingWith2sComplement >> (3 * offsetBits))
return
Expand Down

0 comments on commit 4342727

Please sign in to comment.