~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/arm/include/asm/vfpmacros.h

Version: ~ [ linux-5.12-rc7 ] ~ [ linux-5.11.13 ] ~ [ linux-5.10.29 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.111 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.186 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.230 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.266 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.266 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.18.140 ] ~ [ linux-3.16.85 ] ~ [ linux-3.14.79 ] ~ [ linux-3.12.74 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * arch/arm/include/asm/vfpmacros.h
  3  *
  4  * Assembler-only file containing VFP macros and register definitions.
  5  */
  6 #include <asm/hwcap.h>
  7 
  8 #include <asm/vfp.h>
  9 
 10 @ Macros to allow building with old toolkits (with no VFP support)
 11         .macro  VFPFMRX, rd, sysreg, cond
 12         MRC\cond        p10, 7, \rd, \sysreg, cr0, 0    @ FMRX  \rd, \sysreg
 13         .endm
 14 
 15         .macro  VFPFMXR, sysreg, rd, cond
 16         MCR\cond        p10, 7, \rd, \sysreg, cr0, 0    @ FMXR  \sysreg, \rd
 17         .endm
 18 
 19         @ read all the working registers back into the VFP
 20         .macro  VFPFLDMIA, base, tmp
 21 #if __LINUX_ARM_ARCH__ < 6
 22         LDC     p11, cr0, [\base],#33*4             @ FLDMIAX \base!, {d0-d15}
 23 #else
 24         LDC     p11, cr0, [\base],#32*4             @ FLDMIAD \base!, {d0-d15}
 25 #endif
 26 #ifdef CONFIG_VFPv3
 27 #if __LINUX_ARM_ARCH__ <= 6
 28         ldr     \tmp, =elf_hwcap                    @ may not have MVFR regs
 29         ldr     \tmp, [\tmp, #0]
 30         tst     \tmp, #HWCAP_VFPD32
 31         ldcnel  p11, cr0, [\base],#32*4             @ FLDMIAD \base!, {d16-d31}
 32         addeq   \base, \base, #32*4                 @ step over unused register space
 33 #else
 34         VFPFMRX \tmp, MVFR0                         @ Media and VFP Feature Register 0
 35         and     \tmp, \tmp, #MVFR0_A_SIMD_MASK      @ A_SIMD field
 36         cmp     \tmp, #2                            @ 32 x 64bit registers?
 37         ldceql  p11, cr0, [\base],#32*4             @ FLDMIAD \base!, {d16-d31}
 38         addne   \base, \base, #32*4                 @ step over unused register space
 39 #endif
 40 #endif
 41         .endm
 42 
 43         @ write all the working registers out of the VFP
 44         .macro  VFPFSTMIA, base, tmp
 45 #if __LINUX_ARM_ARCH__ < 6
 46         STC     p11, cr0, [\base],#33*4             @ FSTMIAX \base!, {d0-d15}
 47 #else
 48         STC     p11, cr0, [\base],#32*4             @ FSTMIAD \base!, {d0-d15}
 49 #endif
 50 #ifdef CONFIG_VFPv3
 51 #if __LINUX_ARM_ARCH__ <= 6
 52         ldr     \tmp, =elf_hwcap                    @ may not have MVFR regs
 53         ldr     \tmp, [\tmp, #0]
 54         tst     \tmp, #HWCAP_VFPD32
 55         stcnel  p11, cr0, [\base],#32*4             @ FSTMIAD \base!, {d16-d31}
 56         addeq   \base, \base, #32*4                 @ step over unused register space
 57 #else
 58         VFPFMRX \tmp, MVFR0                         @ Media and VFP Feature Register 0
 59         and     \tmp, \tmp, #MVFR0_A_SIMD_MASK      @ A_SIMD field
 60         cmp     \tmp, #2                            @ 32 x 64bit registers?
 61         stceql  p11, cr0, [\base],#32*4             @ FSTMIAD \base!, {d16-d31}
 62         addne   \base, \base, #32*4                 @ step over unused register space
 63 #endif
 64 #endif
 65         .endm
 66 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp