Home | History | Annotate | Line # | Download | only in include
vfpreg.h revision 1.15
      1  1.15     skrll /*      $NetBSD: vfpreg.h,v 1.15 2016/03/03 17:01:31 skrll Exp $ */
      2   1.1  rearnsha 
      3   1.1  rearnsha /*
      4   1.1  rearnsha  * Copyright (c) 2008 ARM Ltd
      5   1.1  rearnsha  * All rights reserved.
      6   1.1  rearnsha  *
      7   1.1  rearnsha  * Redistribution and use in source and binary forms, with or without
      8   1.1  rearnsha  * modification, are permitted provided that the following conditions
      9   1.1  rearnsha  * are met:
     10   1.1  rearnsha  * 1. Redistributions of source code must retain the above copyright
     11   1.1  rearnsha  *    notice, this list of conditions and the following disclaimer.
     12   1.1  rearnsha  * 2. Redistributions in binary form must reproduce the above copyright
     13   1.1  rearnsha  *    notice, this list of conditions and the following disclaimer in the
     14   1.1  rearnsha  *    documentation and/or other materials provided with the distribution.
     15   1.1  rearnsha  * 3. The name of the company may not be used to endorse or promote
     16   1.1  rearnsha  *    products derived from this software without specific prior written
     17   1.1  rearnsha  *    permission.
     18   1.1  rearnsha  *
     19   1.1  rearnsha  * THIS SOFTWARE IS PROVIDED BY ARM LTD ``AS IS'' AND ANY EXPRESS OR
     20   1.1  rearnsha  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
     21   1.1  rearnsha  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     22   1.1  rearnsha  * ARE DISCLAIMED.  IN NO EVENT SHALL ARM LTD BE LIABLE FOR ANY
     23   1.1  rearnsha  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     24   1.1  rearnsha  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
     25   1.1  rearnsha  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     26   1.1  rearnsha  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
     27   1.1  rearnsha  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
     28   1.1  rearnsha  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
     29   1.1  rearnsha  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     30   1.1  rearnsha  */
     31   1.1  rearnsha 
     32  1.12  christos #ifndef _ARM_VFPREG_H_
     33  1.12  christos #define _ARM_VFPREG_H_
     34   1.1  rearnsha 
     35  1.12  christos /* FPSID register */
     36   1.1  rearnsha 
     37   1.1  rearnsha #define VFP_FPSID_IMP_MSK	0xff000000	/* Implementer */
     38   1.1  rearnsha #define VFP_FPSID_IMP_ARM	0x41000000	/* Implementer: ARM */
     39   1.1  rearnsha #define VFP_FPSID_SW		0x00800000	/* VFP implemented in SW */
     40   1.1  rearnsha #define VFP_FPSID_FMT_MSK	0x00600000	/* FLDMX/FSTMX Format */
     41   1.1  rearnsha #define VFP_FPSID_FMT_1		0x00000000	/* Standard format 1 */
     42   1.1  rearnsha #define VFP_FPSID_FMT_2		0x00200000	/* Standard format 2 */
     43   1.1  rearnsha #define VFP_FPSID_FMT_WEIRD	0x00600000	/* Non-standard format */
     44   1.1  rearnsha #define VFP_FPSID_SP		0x00100000	/* Only single precision */
     45   1.1  rearnsha #define VFP_FPSID_ARCH_MSK	0x000f0000	/* Architecture */
     46   1.1  rearnsha #define VFP_FPSID_ARCH_V1	0x00000000	/* Arch VFPv1 */
     47   1.1  rearnsha #define VFP_FPSID_ARCH_V2	0x00010000	/* Arch VFPv2 */
     48   1.6      matt #define VFP_FPSID_ARCH_V3_2	0x00020000	/* Arch VFPv3 (subarch v2) */
     49   1.6      matt #define VFP_FPSID_ARCH_V3	0x00030000	/* Arch VFPv3 (no subarch) */
     50   1.6      matt #define VFP_FPSID_ARCH_V3_3	0x00040000	/* Arch VFPv3 (subarch v3) */
     51   1.1  rearnsha #define VFP_FPSID_PART_MSK	0x0000ff00	/* Part number */
     52   1.1  rearnsha #define VFP_FPSID_PART_VFP10	0x00001000	/* VFP10 */
     53   1.2      matt #define VFP_FPSID_PART_VFP11	0x00002000	/* VFP11 */
     54   1.5      matt #define VFP_FPSID_PART_VFP30	0x00003000	/* VFP30 */
     55   1.1  rearnsha #define VFP_FPSID_VAR_MSK	0x000000f0	/* Variant */
     56   1.1  rearnsha #define VFP_FPSID_VAR_ARM10	0x000000a0	/* Variant ARM10 */
     57   1.2      matt #define VFP_FPSID_VAR_ARM11	0x000000b0	/* Variant ARM11 */
     58   1.1  rearnsha #define VFP_FPSID_REV_MSK	0x0000000f	/* Revision */
     59   1.1  rearnsha 
     60   1.1  rearnsha #define FPU_VFP10_ARM10E	0x410001a0	/* Really a VFPv2 part */
     61   1.1  rearnsha #define FPU_VFP11_ARM11		0x410120b0
     62   1.6      matt #define FPU_VFP_CORTEXA5	0x41023050
     63   1.6      matt #define FPU_VFP_CORTEXA7	0x41023070
     64   1.6      matt #define FPU_VFP_CORTEXA8	0x410330c0
     65   1.6      matt #define FPU_VFP_CORTEXA9	0x41033090
     66   1.9      matt #define FPU_VFP_CORTEXA15	0x410330f0
     67  1.14       slp #define FPU_VFP_CORTEXA15_QEMU	0x410430f0
     68  1.15     skrll #define FPU_VFP_CORTEXA53	0x41034030
     69  1.13      matt #define FPU_VFP_MV88SV58XX	0x56022090
     70   1.1  rearnsha 
     71   1.8      matt #define VFP_FPEXC_EX		0x80000000	/* EXception status bit */
     72   1.2      matt #define VFP_FPEXC_EN		0x40000000	/* VFP Enable bit */
     73   1.8      matt #define VFP_FPEXC_DEX		0x20000000	/* Defined sync EXception bit */
     74   1.8      matt #define VFP_FPEXC_FP2V		0x10000000	/* FPinst2 instruction Valid */
     75   1.8      matt #define VFP_FPEXC_VV		0x08000000	/* Vecitr Valid */
     76   1.8      matt #define VFP_FPEXC_TFV		0x04000000	/* Trapped Fault Valid */
     77   1.8      matt #define VFP_FPEXC_VECITR	0x00000700	/* VECtor ITeRation count */
     78   1.8      matt #define VFP_FPEXC_IDF		0x00000080	/* Input Denormal flag */
     79   1.8      matt #define VFP_FPEXC_IXF		0x00000010	/* Potential inexact flag */
     80   1.8      matt #define VFP_FPEXC_UFF		0x00000008	/* Potential underflow flag */
     81   1.8      matt #define VFP_FPEXC_OFF		0x00000004	/* Potential overflow flag */
     82   1.8      matt #define VFP_FPEXC_DZF		0x00000002	/* Potential DivByZero flag */
     83   1.8      matt #define VFP_FPEXC_IOF		0x00000001	/* Potential inv. op. flag */
     84  1.11     skrll #define VFP_FPEXC_FSUM		0x000000ff	/* all flag bits */
     85   1.2      matt 
     86   1.2      matt #define VFP_FPSCR_N	0x80000000	/* set if compare <= result */
     87   1.2      matt #define VFP_FPSCR_Z	0x40000000	/* set if compare = result */
     88   1.2      matt #define VFP_FPSCR_C	0x20000000	/* set if compare (=,>=,UNORD) result */
     89   1.2      matt #define VFP_FPSCR_V	0x10000000	/* set if compare UNORD result */
     90  1.10      matt #define VFP_FPSCR_QC	0x08000000	/* Cumulative saturation (SIMD) */
     91  1.10      matt #define VFP_FPSCR_AHP	0x04000000	/* Alternative Half-Precision */
     92   1.2      matt #define VFP_FPSCR_DN	0x02000000	/* Default NaN mode */
     93   1.2      matt #define VFP_FPSCR_FZ	0x01000000	/* Flush-to-zero mode */
     94   1.2      matt #define VFP_FPSCR_RMODE	0x00c00000	/* Rounding Mode */
     95   1.2      matt #define VFP_FPSCR_RZ	0x00c00000	/* round towards zero (RZ) */
     96   1.2      matt #define VFP_FPSCR_RM	0x00800000	/* round towards +INF (RP) */
     97   1.2      matt #define VFP_FPSCR_RP	0x00400000	/* round towards -INF (RM) */
     98   1.2      matt #define VFP_FPSCR_RN	0x00000000	/* round to nearest (RN) */
     99   1.2      matt #define VFP_FPSCR_STRIDE 0x00300000	/* Vector Stride */
    100   1.2      matt #define VFP_FPSCR_LEN	0x00070000	/* Vector Length */
    101   1.2      matt #define VFP_FPSCR_IDE	0x00008000	/* Inout Subnormal Exception Enable */
    102   1.4      matt #define VFP_FPSCR_ESUM	0x00001f00	/* IXE|UFE|OFE|DZE|IOE */
    103   1.2      matt #define VFP_FPSCR_IXE	0x00001000	/* Inexact Exception Enable */
    104   1.2      matt #define VFP_FPSCR_UFE	0x00000800	/* Underflow Exception Enable */
    105   1.2      matt #define VFP_FPSCR_OFE	0x00000400	/* Overflow Exception Enable */
    106   1.8      matt #define VFP_FPSCR_DZE	0x00000200	/* DivByZero Exception Enable */
    107   1.2      matt #define VFP_FPSCR_IOE	0x00000100	/* Invalid Operation Cumulative Flag */
    108   1.2      matt #define VFP_FPSCR_IDC	0x00000080	/* Input Subnormal Cumlative Flag */
    109   1.4      matt #define VFP_FPSCR_CSUM	0x0000001f	/* IXC|UFC|OFC|DZC|IOC */
    110   1.2      matt #define VFP_FPSCR_IXC	0x00000010	/* Inexact Cumulative Flag */
    111   1.2      matt #define VFP_FPSCR_UFC	0x00000008	/* Underflow Cumulative Flag */
    112   1.2      matt #define VFP_FPSCR_OFC	0x00000004	/* Overflow Cumulative Flag */
    113   1.2      matt #define VFP_FPSCR_DZC	0x00000002	/* DivByZero Cumulative Flag */
    114   1.2      matt #define VFP_FPSCR_IOC	0x00000001	/* Invalid Operation Cumulative Flag */
    115   1.2      matt 
    116  1.12  christos #endif /* _ARM_VFPREG_H_ */
    117