1 /*
2 * arch/s390/kernel/ieee.h
3 *
4 * S390 version
5 * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation
6 * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com),
7 */
8
9 #include <linux/sched.h>
10
_adddf(int R1,int R2)11 static inline void _adddf(int R1,int R2)
12 {
13 current->tss.fprs[R1].fd = current->tss.fprs[R1].fd +
14 current->tss.fprs[R2].fd;
15 }
16
_subdf(int R1,int R2)17 static inline void _subdf(int R1,int R2)
18 {
19 current->tss.fprs[R1].fd = current->tss.fprs[R1].fd -
20 current->tss.fprs[R2].fd;
21 }
22
_muldf(int R1,int R2)23 static inline void _muldf(int R1,int R2)
24 {
25 current->tss.fprs[R1].fd = current->tss.fprs[R1].fd *
26 current->tss.fprs[R2].fd;
27 }
28
_divdf(int R1,int R2)29 static inline void _divdf(int R1,int R2)
30 {
31 current->tss.fprs[R1].fd = current->tss.fprs[R1].fd /
32 current->tss.fprs[R2].fd;
33 }
34
_negdf(int R1,int R2)35 static inline void _negdf(int R1,int R2)
36 {
37 current->tss.fprs[R1].fd = -current->tss.fprs[R1].fd;
38 }
39
_fixdfsi(int R1,int R2)40 static inline void _fixdfsi(int R1,int R2)
41 {
42 current->tss.regs->gprs[R1] = (__u32) current->tss.fprs[R2].fd;
43 }
44
_extendsidf(int R1,int R2)45 static inline void _extendsidf(int R1,int R2)
46 {
47 current->tss.fprs[R1].fd = (double) current->tss.regs->gprs[R2];
48 }
49
50
_addsf(int R1,int R2)51 static inline void _addsf(int R1,int R2)
52 {
53 current->tss.fprs[R1].ff = current->tss.fprs[R1].ff +
54 current->tss.fprs[R2].ff;
55 }
56
_subsf(int R1,int R2)57 static inline void _subsf(int R1,int R2)
58 {
59 current->tss.fprs[R1].ff = current->tss.fprs[R1].ff -
60 current->tss.fprs[R2].ff;
61 }
62
_mulsf(int R1,int R2)63 static inline void _mulsf(int R1,int R2)
64 {
65 current->tss.fprs[R1].ff = current->tss.fprs[R1].ff *
66 current->tss.fprs[R2].ff;
67 }
68
_divsf(int R1,int R2)69 static inline void _divsf(int R1,int R2)
70 {
71 current->tss.fprs[R1].ff = current->tss.fprs[R1].ff /
72 current->tss.fprs[R2].ff;
73 }
74
_negsf(int R1,int R2)75 static inline void _negsf(int R1,int R2)
76 {
77 current->tss.fprs[R1].ff = -current->tss.fprs[R1].ff;
78 }
79
_fixsfsi(int R1,int R2)80 static inline void _fixsfsi(int R1,int R2)
81 {
82 current->tss.regs->gprs[R1] = (__u32) current->tss.fprs[R2].ff;
83 }
84
_extendsisf(int R1,int R2)85 static inline void _extendsisf(int R1,int R2)
86 {
87 current->tss.fprs[R1].ff = (double) current->tss.regs->gprs[R2];
88 }
89
90
91