The routines here do some basic bit and byte moving. These routines are called by the code generated by Mimosa -- they should never by called directly by clients.
XR←MoveWords(dest, src, len) -- moves len words (where a word is an 'int') from src to dest. The caller does not assure disjointness.
XR←MoveWordsDisjoint(dest, src, len) -- moves len words (where a word is an 'int') from src to dest. For efficiency, the caller assures disjointedness.
XR𡤎qualWords(src1, src2, len) -- tests the two multi-word variables for equality.
XR←MoveBytesDisjoint(dest, src, len) -- moves len bytes from src to dest, and returns src. For efficiency, the caller assures disjointedness. (Actually, the current implementation does not require disjointedness.)
XR←MoveBytes(dest, src, len) -- moves len bytes from src to dest, and returns src. No assumptions are made about disjointedness.
XR𡤎xtractField(base, offset, bits) -- extracts a bits-bit field from any base pointer (pointer to word) at any bit offset. The word returned has the bits right-justified. The other bits are set to zero. bits must be less than or equal to 32 (for larger values use XR←MoveField ).
XRpositField(base, offset, bits, word) -- deposits the rightmost bits bits of word at the bits bitfield beginning at offset from base. The other bits in word are ignored.
XR←MoveField(dst, dstOffset, src, srcOffset, bits) -- moves 'bits' bits from src to dest. Uses sun bitblt. Approximate timings on a Sun-3/260 are: Move the first bit: 80 microseconds. Each successive bit: 43 nanoseconds.
XR𡤎qualFields(x, xOffset, y, yOffset, bits) -- tests bitfields for equality.
XR𡤏illFields(dst, dstOffset, bits, times, value) -- fills contiguous fields that each are bits wide in the dst address (plus dstOffset bits) for times number of fields. The fill value will be right-justified in value.
XR𡤏illLongFields(dst, dstOffset, src, srcOffset, bits, times) -- fills contiguous fields that each are bits wide in the dst address (plus dstOffset bits) for times number of fields. The fill value is taken from the src address (plus srcOffset bits).
XR𡤏illWords(dst, times, value) -- fills times words at the destination with value.
XR𡤏illLongWords(dst, src, nWords, times) -- fills times nWords fields at the destination (dst) with the nWords field at the src.