VirtualBox

Changeset 95448 in vbox for trunk/include/iprt/types.h


Ignore:
Timestamp:
Jun 30, 2022 8:23:26 AM (2 years ago)
Author:
vboxsync
Message:

iprt/types.h: Added signed views to the RTUINT*U unions. Needed for AVX/SSE/MMX. bugref:9898

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/types.h

    r95304 r95448  
    337337    uint16_t    u;
    338338
    339     /** 16-bit view. */
    340     uint16_t    au16[1];
    341     /** 8-bit view. */
    342     uint8_t     au8[2];
    343339    /** 16-bit hi/lo view. */
    344340    struct
     
    352348#endif
    353349    } s;
     350
     351    /** Unsigned 16-bit view. */
     352    uint16_t    au16[1];
     353    /** Unsigned 8-bit view. */
     354    uint8_t     au8[2];
     355
     356    /** Signed 16-bit view. */
     357    int16_t     ai16[1];
     358    /** Signed 8-bit view. */
     359    int8_t      ai8[2];
    354360} RTUINT16U;
    355361/** Pointer to a 16-bit unsigned integer union. */
     
    389395    } Words;
    390396
    391     /** 32-bit view. */
     397    /** Unsigned 32-bit view. */
    392398    uint32_t    au32[1];
    393     /** 16-bit view. */
     399    /** Unsigned 16-bit view. */
    394400    uint16_t    au16[2];
    395     /** 8-bit view. */
     401    /** Unsigned 8-bit view. */
    396402    uint8_t     au8[4];
     403
     404    /** Signed 32-bit view. */
     405    int32_t     ai32[1];
     406    /** Signed 16-bit view. */
     407    int16_t     ai16[2];
     408    /** Signed 8-bit view. */
     409    int8_t      ai8[4];
    397410} RTUINT32U;
    398411/** Pointer to a 32-bit unsigned integer union. */
     
    447460    } Words;
    448461
    449     /** 64-bit view. */
     462    /** Unsigned 64-bit view. */
    450463    uint64_t    au64[1];
    451     /** 32-bit view. */
     464    /** Unsigned 32-bit view. */
    452465    uint32_t    au32[2];
    453     /** 16-bit view. */
     466    /** Unsigned 16-bit view. */
    454467    uint16_t    au16[4];
    455     /** 8-bit view. */
     468    /** Unsigned 8-bit view. */
    456469    uint8_t     au8[8];
     470
     471    /** Signed 64-bit view. */
     472    int64_t     ai64[1];
     473    /** Signed 32-bit view. */
     474    int32_t     ai32[2];
     475    /** Signed 16-bit view. */
     476    int16_t     ai16[4];
     477    /** Signed 8-bit view. */
     478    int8_t      ai8[8];
    457479} RTUINT64U;
    458480/** Pointer to a 64-bit unsigned integer union. */
     
    536558    } Words;
    537559
    538     /** 64-bit view. */
     560    /** Unsigned 64-bit view. */
    539561    uint64_t    au64[2];
    540     /** 32-bit view. */
     562    /** Unsigned 32-bit view. */
    541563    uint32_t    au32[4];
    542     /** 16-bit view. */
     564    /** Unsigned 16-bit view. */
    543565    uint16_t    au16[8];
    544     /** 8-bit view. */
     566    /** Unsigned 8-bit view. */
    545567    uint8_t     au8[16];
     568
     569    /** Signed 64-bit view. */
     570    int64_t     ai64[2];
     571    /** Signed 32-bit view. */
     572    int32_t     ai32[4];
     573    /** Signed 16-bit view. */
     574    int16_t     ai16[8];
     575    /** Signed 8-bit view. */
     576    int8_t      ai8[16];
    546577} RTUINT128U;
    547578#pragma pack()
     
    664695    } DQWords;
    665696
    666     /** 128-bit view. */
     697    /** Unsigned 128-bit view. */
    667698    RTUINT128U  au128[2];
    668     /** 64-bit view. */
     699    /** Unsigned 64-bit view. */
    669700    uint64_t    au64[4];
    670     /** 32-bit view. */
     701    /** Unsigned 32-bit view. */
    671702    uint32_t    au32[8];
    672     /** 16-bit view. */
     703    /** Unsigned 16-bit view. */
    673704    uint16_t    au16[16];
    674     /** 8-bit view. */
     705    /** Unsigned 8-bit view. */
    675706    uint8_t     au8[32];
     707
     708    /** Signed 64-bit view. */
     709    int64_t     ai64[4];
     710    /** Signed 32-bit view. */
     711    int32_t     ai32[8];
     712    /** Signed 16-bit view. */
     713    int16_t     ai16[16];
     714    /** Signed 8-bit view. */
     715    int8_t      ai8[32];
    676716} RTUINT256U;
    677717#pragma pack()
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette