Skip to content

Commit

Permalink
remove comments
Browse files Browse the repository at this point in the history
  • Loading branch information
David Case committed Sep 2, 2024
1 parent 7e18cab commit 452df29
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions script/interpreter/operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -1459,27 +1459,6 @@ func opcodeLShift(op *ParsedOpcode, t *thread) error {
return err
}

// uint8_t mask = make_lshift_mask(bit_shift);
// uint8_t overflow_mask = ~mask;

// valtype result(x.size(), 0x00);
// for (valtype::size_type index = x.size(); index > 0; index--) {
// valtype::size_type i = index - 1;
// // make sure that k is always >= 0
// if (byte_shift <= i)
// {
// valtype::size_type k = i - byte_shift;
// uint8_t val = (x[i] & mask);
// val <<= bit_shift;
// result[k] |= val;

// if (k >= 1) {
// uint8_t carryval = (x[i] & overflow_mask);
// carryval >>= 8 - bit_shift;
// result[k - 1] |= carryval;
// }
// }
// }
bitShift := n % 8
byteShift := n / 8
mask := []byte{0xFF, 0x7F, 0x3F, 0x1F, 0x0F, 0x07, 0x03, 0x01}[bitShift]
Expand Down

0 comments on commit 452df29

Please sign in to comment.