Cryptography Reference
In-Depth Information
void
or_l (CLINT a_l, CLINT b_l, CLINT c_l)
{
CLINT d_l;
clint *r_l, *s_l, *t_l;
clint *msdptrr_l;
clint *msdptrs_l;
The pointers r_l and s_l are set as above.
if (DIGITS_L (a_l) < DIGITS_L (b_l))
{
r_l = LSDPTR_L (b_l);
s_l = LSDPTR_L (a_l);
msdptrr_l = MSDPTR_L (b_l);
msdptrs_l = MSDPTR_L (a_l);
}
else
{
r_l = LSDPTR_L (a_l);
s_l = LSDPTR_L (b_l);
msdptrr_l = MSDPTR_L (a_l);
msdptrs_l = MSDPTR_L (b_l);
}
t_l = LSDPTR_L (d_l);
SETDIGITS_L (d_l, DIGITS_L (r_l - 1));
The actual operation takes place within a loop over the digits of the shorter of the
two arguments.
while (s_l <= msdptrs_l)
{
*t_l++ = *r_l++ | *s_l++;
}
The remaining digits of the longer argument are taken into the result. After the
result is copied to c_l , where any leading zeros are eliminated, the function is
terminated.
Search WWH ::




Custom Search