Changes in kernel/arch/ppc32/src/fpu_context.S [9d58539:df7f5cea] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ppc32/src/fpu_context.S
r9d58539 rdf7f5cea 29 29 #include <arch/asm/regname.h> 30 30 #include <arch/context_offset.h> 31 #include <arch/msr.h> 31 32 32 33 .text … … 39 40 40 41 .macro FPU_CONTEXT_STORE r 42 stfd fr0, OFFSET_FR0(\r) 43 stfd fr1, OFFSET_FR1(\r) 44 stfd fr2, OFFSET_FR2(\r) 45 stfd fr3, OFFSET_FR3(\r) 46 stfd fr4, OFFSET_FR4(\r) 47 stfd fr5, OFFSET_FR5(\r) 48 stfd fr6, OFFSET_FR6(\r) 49 stfd fr7, OFFSET_FR7(\r) 50 stfd fr8, OFFSET_FR8(\r) 51 stfd fr9, OFFSET_FR9(\r) 52 stfd fr10, OFFSET_FR10(\r) 53 stfd fr11, OFFSET_FR11(\r) 54 stfd fr12, OFFSET_FR12(\r) 55 stfd fr13, OFFSET_FR13(\r) 41 56 stfd fr14, OFFSET_FR14(\r) 42 57 stfd fr15, OFFSET_FR15(\r) … … 60 75 61 76 .macro FPU_CONTEXT_LOAD r 77 lfd fr0, OFFSET_FR0(\r) 78 lfd fr1, OFFSET_FR1(\r) 79 lfd fr2, OFFSET_FR2(\r) 80 lfd fr3, OFFSET_FR3(\r) 81 lfd fr4, OFFSET_FR4(\r) 82 lfd fr5, OFFSET_FR5(\r) 83 lfd fr6, OFFSET_FR6(\r) 84 lfd fr7, OFFSET_FR7(\r) 85 lfd fr8, OFFSET_FR8(\r) 86 lfd fr9, OFFSET_FR9(\r) 87 lfd fr10, OFFSET_FR10(\r) 88 lfd fr11, OFFSET_FR11(\r) 89 lfd fr12, OFFSET_FR12(\r) 90 lfd fr13, OFFSET_FR13(\r) 62 91 lfd fr14, OFFSET_FR14(\r) 63 92 lfd fr15, OFFSET_FR15(\r) … … 81 110 82 111 fpu_context_save: 83 //FPU_CONTEXT_STORE r384 //85 //mffs fr086 //stfd fr0, OFFSET_FPSCR(r3)112 FPU_CONTEXT_STORE r3 113 114 mffs fr0 115 stfd fr0, OFFSET_FPSCR(r3) 87 116 88 117 blr 89 118 90 119 fpu_context_restore: 91 // FPU_CONTEXT_LOAD r3 92 // 93 // lfd fr0, OFFSET_FPSCR(r3) 94 // mtfsf 7, fr0 120 lfd fr0, OFFSET_FPSCR(r3) 121 mtfsf 7, fr0 122 123 FPU_CONTEXT_LOAD r3 95 124 96 125 blr 97 126 98 127 fpu_init: 128 mfmsr r0 129 ori r0, r0, MSR_FP 130 131 # Disable FPU exceptions 132 li r3, MSR_FE0 | MSR_FE1 133 andc r0, r0, r3 134 135 mtmsr r0 99 136 blr 100 137 101 138 fpu_enable: 139 mfmsr r0 140 ori r0, r0, MSR_FP 141 mtmsr r0 102 142 blr 103 143 104 144 fpu_disable: 145 mfmsr r0 146 li r3, MSR_FP 147 andc r0, r0, r3 148 mtmsr r0 105 149 blr 150
Note:
See TracChangeset
for help on using the changeset viewer.