Tag:Bit field

  • Alignment of Python bit field operations

    Time:2020-2-3

    It defines how many bits a bit field occupies, but Python inserts many zeros in the middle for byte alignment;Later I added._pack_ = 1In some cases, there is still 0 insertion;_pack_ = 1I feel there is a bug When ctypes is used, the bit field must be aligned with 8 bits. Only by manually separating […]

  • Bit field isa pointer

    Time:2019-12-25

    1、 Isa pointer structure union isa_t { isa_t() { } isa_t(uintptr_t value) : bits(value) { } Class cls; uintptr_t bits; #if SUPPORT_PACKED_ISA // extra_rc must be the MSB-most field (so it matches carry/overflow flags) // nonpointer must be the LSB (fixme or get rid of it) // shiftcls must occupy the same bits that a […]