// SPDX-License-Identifier: GPL-2.0-only /* * fpu.c - save/restore of Floating Point Unit Registers on task switch * * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
*/
#include <linux/sched.h> #include <asm/fpu.h>
#ifdef CONFIG_ISA_ARCOMPACT
/* * To save/restore FPU regs, simplest scheme would use LR/SR insns. * However since SR serializes the pipeline, an alternate "hack" can be used * which uses the FPU Exchange insn (DEXCL) to r/w FPU regs. * * Store to 64bit dpfp1 reg from a pair of core regs: * dexcl1 0, r1, r0 ; where r1:r0 is the 64 bit val * * Read from dpfp1 into pair of core regs (w/o clobbering dpfp1) * mov_s r3, 0 * daddh11 r1, r3, r3 ; get "hi" into r1 (dpfp1 unchanged) * dexcl1 r0, r1, r3 ; get "low" into r0 (dpfp1 low clobbered) * dexcl1 0, r1, r0 ; restore dpfp1 to orig value * * However we can tweak the read, so that read-out of outgoing task's FPU regs * and write of incoming task's regs happen in one shot. So all the work is * done before context switch
*/
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.