Lines Matching refs:offset
717 Perl_do_vecget(pTHX_ SV *sv, I32 offset, I32 size)
723 if (offset < 0)
731 offset *= size; /* turn into bit offset */
732 len = (offset + size + 7) / 8; /* required number of bytes */
737 offset >>= 3; /* turn into byte offset */
739 if ((STRLEN)offset >= srclen)
742 retnum = (UV) s[offset] << 8;
745 if ((STRLEN)offset >= srclen)
747 else if ((STRLEN)(offset + 1) >= srclen)
749 ((UV) s[offset ] << 24);
750 else if ((STRLEN)(offset + 2) >= srclen)
752 ((UV) s[offset ] << 24) +
753 ((UV) s[offset + 1] << 16);
756 ((UV) s[offset ] << 24) +
757 ((UV) s[offset + 1] << 16) +
758 ( s[offset + 2] << 8);
765 if (offset >= srclen)
767 else if (offset + 1 >= srclen)
769 (UV) s[offset ] << 56;
770 else if (offset + 2 >= srclen)
772 ((UV) s[offset ] << 56) +
773 ((UV) s[offset + 1] << 48);
774 else if (offset + 3 >= srclen)
776 ((UV) s[offset ] << 56) +
777 ((UV) s[offset + 1] << 48) +
778 ((UV) s[offset + 2] << 40);
779 else if (offset + 4 >= srclen)
781 ((UV) s[offset ] << 56) +
782 ((UV) s[offset + 1] << 48) +
783 ((UV) s[offset + 2] << 40) +
784 ((UV) s[offset + 3] << 32);
785 else if (offset + 5 >= srclen)
787 ((UV) s[offset ] << 56) +
788 ((UV) s[offset + 1] << 48) +
789 ((UV) s[offset + 2] << 40) +
790 ((UV) s[offset + 3] << 32) +
791 ( s[offset + 4] << 24);
792 else if (offset + 6 >= srclen)
794 ((UV) s[offset ] << 56) +
795 ((UV) s[offset + 1] << 48) +
796 ((UV) s[offset + 2] << 40) +
797 ((UV) s[offset + 3] << 32) +
798 ((UV) s[offset + 4] << 24) +
799 ((UV) s[offset + 5] << 16);
802 ((UV) s[offset ] << 56) +
803 ((UV) s[offset + 1] << 48) +
804 ((UV) s[offset + 2] << 40) +
805 ((UV) s[offset + 3] << 32) +
806 ((UV) s[offset + 4] << 24) +
807 ((UV) s[offset + 5] << 16) +
808 ( s[offset + 6] << 8);
814 retnum = (s[offset >> 3] >> (offset & 7)) & ((1 << size) - 1);
816 offset >>= 3; /* turn into byte offset */
818 retnum = s[offset];
821 ((UV) s[offset] << 8) +
822 s[offset + 1];
825 ((UV) s[offset ] << 24) +
826 ((UV) s[offset + 1] << 16) +
827 ( s[offset + 2] << 8) +
828 s[offset + 3];
835 ((UV) s[offset ] << 56) +
836 ((UV) s[offset + 1] << 48) +
837 ((UV) s[offset + 2] << 40) +
838 ((UV) s[offset + 3] << 32) +
839 ((UV) s[offset + 4] << 24) +
840 ((UV) s[offset + 5] << 16) +
841 ( s[offset + 6] << 8) +
842 s[offset + 7];
858 register I32 offset;
879 offset = LvTARGOFF(sv);
880 if (offset < 0)
881 Perl_croak(aTHX_ "Negative offset to vec in lvalue context");
886 offset *= size; /* turn into bit offset */
887 len = (offset + size + 7) / 8; /* required number of bytes */
896 size = offset & 7;
898 offset >>= 3; /* turn into byte offset */
899 s[offset] &= ~(mask << size);
900 s[offset] |= lval << size;
903 offset >>= 3; /* turn into byte offset */
905 s[offset ] = (U8)( lval & 0xff);
907 s[offset ] = (U8)((lval >> 8) & 0xff);
908 s[offset+1] = (U8)( lval & 0xff);
911 s[offset ] = (U8)((lval >> 24) & 0xff);
912 s[offset+1] = (U8)((lval >> 16) & 0xff);
913 s[offset+2] = (U8)((lval >> 8) & 0xff);
914 s[offset+3] = (U8)( lval & 0xff);
921 s[offset ] = (U8)((lval >> 56) & 0xff);
922 s[offset+1] = (U8)((lval >> 48) & 0xff);
923 s[offset+2] = (U8)((lval >> 40) & 0xff);
924 s[offset+3] = (U8)((lval >> 32) & 0xff);
925 s[offset+4] = (U8)((lval >> 24) & 0xff);
926 s[offset+5] = (U8)((lval >> 16) & 0xff);
927 s[offset+6] = (U8)((lval >> 8) & 0xff);
928 s[offset+7] = (U8)( lval & 0xff);