> I am working with some IPv6 addresses that are 128 bits long.
> The input to the program is an ip name or address and the
> number of high bits that I need to use for a compare against
> another ip address.

> So, I want to create run time routine to build the a
> 16 byte 'and' bit field based on the input number of bits.
> (I will then 'and' both addresses and then use a simple CLC.)

There is no double 64 bit (that is, 128 bit) shift instruction
as far as I know.

Most obvious is to store the bits in some number of bytes,
halfwords, words, or doublewords. Then, based on the shift
amount, fill some with all ones, and use a shift instruction
(or smaller table) for the boundary case. I would probably
choose words. Using shift and mask, split the shift amount
into 32's and a remainder (or use Divide).

For bytes in memory, EX an MVC, or a loop of MVI, to fill the
high bytes. Use a table of bytes to IC and STC the boundary byte.

-- glen

Reply via email to