182sc_signed::concat_get_data(
sc_digit *dst_p,
int low_i)
const
198 high_i = low_i + nbits - 1;
208 if (dst_i == end_i) {
209 mask = ~(~0U << left_shift);
210 dst_p[dst_i] = ((dst_p[dst_i] & mask) |
214 }
else if (left_shift == 0) {
215 for (src_i = 0; dst_i < end_i; dst_i++, src_i++) {
216 dst_p[dst_i] = digit[src_i];
220 dst_p[dst_i] = digit[src_i] & mask;
226 mask = ~(~0U << left_shift);
227 right_word = digit[0];
228 dst_p[dst_i] = (dst_p[dst_i] & mask) |
230 for (src_i = 1, dst_i++; dst_i < end_i; dst_i++, src_i++) {
231 left_word = digit[src_i];
232 dst_p[dst_i] = ((left_word << left_shift)&
DIGIT_MASK) |
233 (right_word >> right_shift);
234 right_word = left_word;
236 left_word = (src_i < ndigits) ? digit[src_i] : 0;
238 dst_p[dst_i] = ((left_word << left_shift) |
239 (right_word >> right_shift)) & mask;
247 if (dst_i == end_i) {
248 mask = ~(~0U << nbits);
249 right_word = ((digit[0] ^
DIGIT_MASK) + 1) & mask;
250 mask = ~(~0U << left_shift);
251 dst_p[dst_i] = ((dst_p[dst_i] & mask) |
255 }
else if (left_shift == 0) {
257 for (src_i = 0; dst_i < end_i; dst_i++, src_i++) {
258 right_word = (digit[src_i] ^
DIGIT_MASK) + carry;
264 right_word = (src_i < ndigits) ?
266 dst_p[dst_i] = right_word & mask;
272 mask = ~(~0U << left_shift);
275 dst_p[dst_i] = (dst_p[dst_i] & mask) |
279 for (src_i = 1, dst_i++; dst_i < end_i; dst_i++, src_i++) {
280 left_word = (digit[src_i] ^
DIGIT_MASK) + carry;
281 dst_p[dst_i] = ((left_word << left_shift)&
DIGIT_MASK) |
282 (right_word >> right_shift);
286 left_word = (src_i < ndigits) ?
289 dst_p[dst_i] = ((left_word << left_shift) |
290 (right_word >> right_shift)) & mask;
298 if (dst_i == end_i) {
299 mask = ~(~0U << nbits) << left_shift;
300 dst_p[dst_i] = dst_p[dst_i] & ~mask;
303 }
else if (left_shift == 0) {
304 for (src_i = 0; dst_i < end_i; dst_i++, src_i++) {
311 mask = ~(~0U << left_shift);
312 dst_p[dst_i] = (dst_p[dst_i] & mask);
313 for (dst_i++; dst_i <= end_i; dst_i++) {
sc_signed xor_signed_friend(small_type us, int unb, int und, const sc_digit *ud, small_type vs, int vnb, int vnd, const sc_digit *vd)
sc_signed and_signed_friend(small_type us, int unb, int und, const sc_digit *ud, small_type vs, int vnb, int vnd, const sc_digit *vd)
sc_signed add_signed_friend(small_type us, int unb, int und, const sc_digit *ud, small_type vs, int vnb, int vnd, const sc_digit *vd)
sc_signed div_signed_friend(small_type s, int unb, int und, const sc_digit *ud, int vnb, int vnd, const sc_digit *vd)
sc_signed mul_signed_friend(small_type s, int unb, int und, const sc_digit *ud, int vnb, int vnd, const sc_digit *vd)
sc_signed mod_signed_friend(small_type us, int unb, int und, const sc_digit *ud, int vnb, int vnd, const sc_digit *vd)
sc_signed or_signed_friend(small_type us, int unb, int und, const sc_digit *ud, small_type vs, int vnb, int vnd, const sc_digit *vd)