VirtualBox

Changeset 105385 in vbox


Ignore:
Timestamp:
Jul 17, 2024 4:08:51 PM (4 months ago)
Author:
vboxsync
Message:

include/iprt/armv8.h: Add definitions for FPCR and FPSR registers, bugref:10652

File:
1 edited

Legend:

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

    r105175 r105385  
    583583/** TCO - Tag Check Override - ??. */
    584584#define ARMV8_AARCH64_SYSREG_TCO                    ARMV8_AARCH64_SYSREG_ID_CREATE(3, 3, 4, 2, 7)
     585
     586/** FPCR register - RW. */
     587#define ARMV8_AARCH64_SYSREG_FPCR                   ARMV8_AARCH64_SYSREG_ID_CREATE(3, 3, 4, 4, 0)
     588/** FPSR register - RW. */
     589#define ARMV8_AARCH64_SYSREG_FPSR                   ARMV8_AARCH64_SYSREG_ID_CREATE(3, 3, 4, 4, 1)
    585590
    586591/** TPIDR_EL0 register - RW. */
     
    23652370
    23662371
     2372/** @name FPCR - AArch64 Floating Point Control Register.
     2373 * @{ */
     2374/** Bit 0 - Flush Inputs to Zero when FEAT_AFP is supported. */
     2375#define ARMV8_FPCR_FIZ                                          RT_BIT_64(0)
     2376/** Bit 1 - Alternate Handling of floating-point numbers when FEAT_AFP is supported. */
     2377#define ARMV8_FPCR_AH                                           RT_BIT_64(1)
     2378/** Bit 2 - Controls how the output elements other than the lowest element of the vector are determined for
     2379 * Advanced SIMD scalar instructions, when FEAT_AFP is supported. */
     2380#define ARMV8_FPCR_NEP                                          RT_BIT_64(2)
     2381/* Bit 3 - 7 - Reserved.*/
     2382/** Bit 8 - Invalid Operation floating-point exception trap enable. */
     2383#define ARMV8_FPCR_IOE                                          RT_BIT_64(8)
     2384/** Bit 9 - Divide by Zero floating-point exception trap enable. */
     2385#define ARMV8_FPCR_DZE                                          RT_BIT_64(9)
     2386/** Bit 10 - Overflow floating-point exception trap enable. */
     2387#define ARMV8_FPCR_OFE                                          RT_BIT_64(10)
     2388/** Bit 11 - Underflow floating-point exception trap enable. */
     2389#define ARMV8_FPCR_UFE                                          RT_BIT_64(11)
     2390/** Bit 12 - Inexact floating-point exception trap enable. */
     2391#define ARMV8_FPCR_IXE                                          RT_BIT_64(12)
     2392/** Bit 13 - Controls numeric behavior of BFloat16 dot productions calculations performed,
     2393 * supported when FEAT_EBF16 is supported. */
     2394#define ARMV8_FPCR_EBF                                          RT_BIT_64(13)
     2395/* Bit 14 - Reserved */
     2396/** Bit 15 - Input Denormal floating-point exception trap enable. */
     2397#define ARMV8_FPCR_IDE                                          RT_BIT_64(15)
     2398/* Bit 16 - 18 - Reserved for AArch64 (Len field for AArch32). */
     2399/** Bit 19 - Flushing denormalized numbers to zero control bit on half-precision data-processing instructions,
     2400 * available when FEAT_FP16 is supported. */
     2401#define ARMV8_FPCR_FZ16                                         RT_BIT_64(19)
     2402/* Bit 20 - 21 - Reserved for AArch64 (Stride field dor AArch32). */
     2403/** Bit 22 - 23 - Rounding Mode control field. */
     2404#define ARMV8_FPCR_RMODE_MASK                                   (RT_BIT_64(22) | RT_BIT_64(23))
     2405#define ARMV8_FPCR_RMODE_SHIFT                                  22
     2406/** Round to Nearest (RN) mode. */
     2407# define ARMV8_FPCR_RMODE_RN                                    0
     2408/** Round towards Plus Infinity (RP) mode. */
     2409# define ARMV8_FPCR_RMODE_RP                                    1
     2410/** Round towards Minus Infinity (RM) mode. */
     2411# define ARMV8_FPCR_RMODE_RP                                    2
     2412/** Round towards Zero (RZ) mode. */
     2413# define ARMV8_FPCR_RMODE_RZ                                    3
     2414/** Bit 24 - Flushing denormalized numbers to zero control bit. */
     2415#define ARMV8_FPCR_FZ                                           RT_BIT_64(24)
     2416/** Bit 25 - Default NaN use for NaN propagation. */
     2417#define ARMV8_FPCR_DN                                           RT_BIT_64(25)
     2418/** Bit 26 - Alternative half-precision control bit. */
     2419#define ARMV8_FPCR_AHP                                          RT_BIT_64(26)
     2420/* Bit 27 - 63 - Reserved. */
     2421/** @} */
     2422
     2423
     2424/** @name FPSR - AArch64 Floating Point Status Register.
     2425 * @{ */
     2426/** Bit 0 - Invalid Operation cumulative floating-point exception bit. */
     2427#define ARMV8_FPSR_IOC                                          RT_BIT_64(0)
     2428/** Bit 1 - Divide by Zero cumulative floating-point exception bit. */
     2429#define ARMV8_FPSR_DZC                                          RT_BIT_64(1)
     2430/** Bit 2 - Overflow cumulative floating-point exception bit. */
     2431#define ARMV8_FPSR_OFC                                          RT_BIT_64(2)
     2432/** Bit 3 - Underflow cumulative floating-point exception bit. */
     2433#define ARMV8_FPSR_OFC                                          RT_BIT_64(3)
     2434/** Bit 4 - Inexact cumulative floating-point exception bit. */
     2435#define ARMV8_FPSR_IXC                                          RT_BIT_64(4)
     2436/* Bit 5 - 6 - Reserved. */
     2437/** Bit 7 - Input Denormal cumulative floating-point exception bit. */
     2438#define ARMV8_FPSR_IDC                                          RT_BIT_64(7)
     2439/* Bit 8 - 26 - Reserved. */
     2440/** Bit 27 - Cumulative saturation bit, Advanced SIMD only. */
     2441#define ARMV8_FPSR_QC                                           RT_BIT_64(27)
     2442/* Bit 28 - 31 - NZCV bits for AArch32 floating point operations. */
     2443/* Bit 32 - 63 - Reserved. */
     2444/** @} */
     2445
     2446
    23672447#if (!defined(VBOX_FOR_DTRACE_LIB) && defined(__cplusplus) && !defined(ARMV8_WITHOUT_MK_INSTR)) || defined(DOXYGEN_RUNNING)
    23682448/** @defgroup grp_rt_armv8_mkinstr   Instruction Encoding Helpers
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