Nicholas Flintham | 1e3d311 | 2013-04-10 10:48:38 +0100 | [diff] [blame^] | 1 | /* |
| 2 | * arch/arm/include/asm/fpstate.h |
| 3 | * |
| 4 | * Copyright (C) 1995 Russell King |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License version 2 as |
| 8 | * published by the Free Software Foundation. |
| 9 | */ |
| 10 | |
| 11 | #ifndef __ASM_ARM_FPSTATE_H |
| 12 | #define __ASM_ARM_FPSTATE_H |
| 13 | |
| 14 | |
| 15 | #ifndef __ASSEMBLY__ |
| 16 | |
| 17 | |
| 18 | struct vfp_hard_struct { |
| 19 | #ifdef CONFIG_VFPv3 |
| 20 | __u64 fpregs[32]; |
| 21 | #else |
| 22 | __u64 fpregs[16]; |
| 23 | #endif |
| 24 | #if __LINUX_ARM_ARCH__ < 6 |
| 25 | __u32 fpmx_state; |
| 26 | #endif |
| 27 | __u32 fpexc; |
| 28 | __u32 fpscr; |
| 29 | __u32 fpinst; |
| 30 | __u32 fpinst2; |
| 31 | |
| 32 | #ifdef CONFIG_SMP |
| 33 | __u32 cpu; |
| 34 | #endif |
| 35 | }; |
| 36 | |
| 37 | union vfp_state { |
| 38 | struct vfp_hard_struct hard; |
| 39 | }; |
| 40 | |
| 41 | extern void vfp_flush_thread(union vfp_state *); |
| 42 | extern void vfp_release_thread(union vfp_state *); |
| 43 | |
| 44 | #define FP_HARD_SIZE 35 |
| 45 | |
| 46 | struct fp_hard_struct { |
| 47 | unsigned int save[FP_HARD_SIZE]; |
| 48 | }; |
| 49 | |
| 50 | #define FP_SOFT_SIZE 35 |
| 51 | |
| 52 | struct fp_soft_struct { |
| 53 | unsigned int save[FP_SOFT_SIZE]; |
| 54 | }; |
| 55 | |
| 56 | #define IWMMXT_SIZE 0x98 |
| 57 | |
| 58 | struct iwmmxt_struct { |
| 59 | unsigned int save[IWMMXT_SIZE / sizeof(unsigned int)]; |
| 60 | }; |
| 61 | |
| 62 | union fp_state { |
| 63 | struct fp_hard_struct hard; |
| 64 | struct fp_soft_struct soft; |
| 65 | #ifdef CONFIG_IWMMXT |
| 66 | struct iwmmxt_struct iwmmxt; |
| 67 | #endif |
| 68 | }; |
| 69 | |
| 70 | #define FP_SIZE (sizeof(union fp_state) / sizeof(int)) |
| 71 | |
| 72 | struct crunch_state { |
| 73 | unsigned int mvdx[16][2]; |
| 74 | unsigned int mvax[4][3]; |
| 75 | unsigned int dspsc[2]; |
| 76 | }; |
| 77 | |
| 78 | #define CRUNCH_SIZE sizeof(struct crunch_state) |
| 79 | |
| 80 | #endif |
| 81 | |
| 82 | #endif |