xref: /OK3568_Linux_fs/kernel/arch/powerpc/math-emu/stfd.c (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun // SPDX-License-Identifier: GPL-2.0
2*4882a593Smuzhiyun #include <linux/types.h>
3*4882a593Smuzhiyun #include <linux/errno.h>
4*4882a593Smuzhiyun #include <linux/uaccess.h>
5*4882a593Smuzhiyun 
6*4882a593Smuzhiyun int
stfd(void * frS,void * ea)7*4882a593Smuzhiyun stfd(void *frS, void *ea)
8*4882a593Smuzhiyun {
9*4882a593Smuzhiyun #if 0
10*4882a593Smuzhiyun #ifdef DEBUG
11*4882a593Smuzhiyun 	printk("%s: S %p, ea %p: ", __func__, frS, ea);
12*4882a593Smuzhiyun 	dump_double(frS);
13*4882a593Smuzhiyun 	printk("\n");
14*4882a593Smuzhiyun #endif
15*4882a593Smuzhiyun #endif
16*4882a593Smuzhiyun 
17*4882a593Smuzhiyun 	if (copy_to_user(ea, frS, sizeof(double)))
18*4882a593Smuzhiyun 		return -EFAULT;
19*4882a593Smuzhiyun 
20*4882a593Smuzhiyun 	return 0;
21*4882a593Smuzhiyun }
22