- /* rotation to the right is the same as rotation to the left
- * when done by the right amount */
- if (offset < 0) offset = radius + offset;
-
- shift = _val(shift_table[offset % 4]);
- offset = offset / 4;
-
- DEBUGPRINTF(("offset: %d, shift: %d\n", offset, shift));
- for (counter = 0; counter < radius/4 - offset; counter++)
- {
- shl = mul_table[_val(val1[counter])][_val(shift)];
- temp_buffer[counter + offset] = or_table[_val(shl[0])][_val(carry)];
- carry = shl[1];
- DEBUGPRINTF(("%d(%x): %s\n", counter, shl[0], sc_print_hex(temp_buffer)));
- }
- old_counter = counter;
- for (; counter < radius/4; counter++)
- {
- shl = mul_table[_val(val1[counter])][_val(shift)];
- temp_buffer[counter - old_counter] = or_table[_val(shl[0])][_val(carry)];
- carry = shl[1];
- DEBUGPRINTF(("%d(%x)> %s\n", counter, shl[0], sc_print_hex(temp_buffer)));
- }
- temp_buffer[counter - old_counter] = or_table[_val(temp_buffer[counter-old_counter])][_val(carry)];
-
- offset = (radius-1)/4;
- bitoffset - (radius-1)%4;
- /* fill the rest of the buffer depending on msb and mode signedness*/
- if (is_signed && _bitisset(temp_buffer[offset], bitoffset))
- {
-
- }
- else
- {
-
- }