1 // SPDX-License-Identifier: GPL-2.0
2 #include <linux/types.h>
3 #include <linux/errno.h>
4 #include <linux/uaccess.h>
6 #include <asm/sfp-machine.h>
7 #include <math-emu/soft-fp.h>
10 mcrfs(u32
*ccr
, u32 crfD
, u32 crfS
)
15 printk("%s: %p (%08x) %d %d\n", __func__
, ccr
, *ccr
, crfD
, crfS
);
18 clear
= 15 << ((7 - crfS
) << 2);
22 value
= (__FPU_FPSCR
>> ((7 - crfS
) << 2)) & 15;
23 __FPU_FPSCR
&= ~(clear
);
25 *ccr
&= ~(15 << ((7 - crfD
) << 2));
26 *ccr
|= (value
<< ((7 - crfD
) << 2));
29 printk("CR: %08x\n", __func__
, *ccr
);