Wrap the default SPE config in its own #define

No functional change.  Cleans up the code a little.
This commit is contained in:
Justin Hibbits 2021-05-29 21:53:26 -05:00
parent 0137a09d6e
commit 66b2b71df8
3 changed files with 5 additions and 5 deletions

View File

@ -337,6 +337,8 @@
#define SPEFSCR_FUNFE 0x00000008
#define SPEFSCR_FOVFE 0x00000004
#define SPEFSCR_FRMC_M 0x00000003
#define SPEFSCR_DFLT (SPEFSCR_FINVE | SPEFSCR_FDBZE | \
SPEFSCR_FUNFE | SPEFSCR_FOVFE)
#define SPR_IBAT0U 0x210 /* .6. Instruction BAT Reg 0 Upper */
#define SPR_IBAT0L 0x211 /* .6. Instruction BAT Reg 0 Lower */
#define SPR_IBAT1U 0x212 /* .6. Instruction BAT Reg 1 Upper */

View File

@ -1057,8 +1057,7 @@ cpu_copy_thread(struct thread *td, struct thread *td0)
#endif
pcb2->pcb_cpu.aim.usr_vsid = 0;
#ifdef __SPE__
pcb2->pcb_vec.vscr = SPEFSCR_FINVE | SPEFSCR_FDBZE |
SPEFSCR_FUNFE | SPEFSCR_FOVFE;
pcb2->pcb_vec.vscr = SPEFSCR_DFLT;
#endif
/* Setup to release spin count in fork_exit(). */
@ -1113,8 +1112,7 @@ cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg,
td->td_pcb->pcb_flags = 0;
#ifdef __SPE__
td->td_pcb->pcb_vec.vscr = SPEFSCR_FINVE | SPEFSCR_FDBZE |
SPEFSCR_FUNFE | SPEFSCR_FOVFE;
td->td_pcb->pcb_vec.vscr = SPEFSCR_DFLT;
#endif
td->td_retval[0] = (register_t)entry;

View File

@ -224,7 +224,7 @@ ENTRY(fork_trampoline)
does when allocating space for
a frame pointer/saved LR */
#ifdef __SPE__
li %r3,SPEFSCR_FINVE|SPEFSCR_FDBZE|SPEFSCR_FUNFE|SPEFSCR_FOVFE
li %r3,SPEFSCR_DFLT
mtspr SPR_SPEFSCR, %r3
#endif
b trapexit