qemu/target/arm/translate-a64.h
/* Return the offset into CPUARMState of an element of specified
 * size, 'element' places in from the least significant end of
 * the FP/vector register Qn.
 */
Return the offset into CPUARMState of an element of specified
size, 'element' places in from the least significant end of
the FP/vector register Qn.
Return the offset into CPUARMState of an element of specified size ' element ' places in from the least significant end of the FP / vector register Qn .
static inline int vec_reg_offset(DisasContext *s, int regno,
                                 int element, TCGMemOp size)
{
    int element_size = 1 << size;
    int offs = element * element_size;
#ifdef HOST_WORDS_BIGENDIAN
    if (element_size < 8) {
        offs ^= 8 - element_size;
    }
#endif
    offs += offsetof(CPUARMState, vfp.zregs[regno]);
    assert_fp_access_checked(s);
    return offs;
}
static inline int vec_reg_offset ( DisasContext * s , int regno , int element , TCGMemOp size ) { int element_size = 1 << size ; int offs = element * element_size ; #ifdef HOST_WORDS_BIGENDIAN if ( element_size < 8 ) { offs ^= 8 - element_size ; } #endif offs += offsetof ( CPUARMState , vfp . zregs [ regno ] ) ; assert_fp_access_checked ( s ) ; return offs ; }
Return the offset into CPUARMState of an element of specified
 size, 'element' places in from the least significant end of
 the FP/vector register Qn.
Return the offset into CPUARMState of an element of specified size ' element ' places in from the least significant end of the FP / vector register Qn .
/* This is complicated slightly because vfp.zregs[n].d[0] is
     * still the lowest and vfp.zregs[n].d[15] the highest of the
     * 256 byte vector, even on big endian systems.
     *
     * Calculate the offset assuming fully little-endian,
     * then XOR to account for the order of the 8-byte units.
     *
     * For 16 byte elements, the two 8 byte halves will not form a
     * host int128 if the host is bigendian, since they're in the
     * wrong order.  However the only 16 byte operation we have is
     * a move, so we can ignore this for the moment.  More complicated
     * operations will have to special case loading and storing from
     * the zregs array.
     */