TCG README fixes (Stuart Brady)
[qemu/mini2440.git] / target-sparc / fop_template.h
blob0c045b8355bb8588d8339b5dba33e1db5cc94e1f
1 /*
2 * SPARC micro operations (templates for various register related
3 * operations)
5 * Copyright (c) 2003 Fabrice Bellard
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 /* floating point registers moves */
23 void OPPROTO glue(op_load_fpr_FT0_fpr, REGNAME)(void)
25 FT0 = REG;
28 void OPPROTO glue(op_store_FT0_fpr_fpr, REGNAME)(void)
30 REG = FT0;
33 void OPPROTO glue(op_load_fpr_FT1_fpr, REGNAME)(void)
35 FT1 = REG;
38 void OPPROTO glue(op_store_FT1_fpr_fpr, REGNAME)(void)
40 REG = FT1;
43 /* double floating point registers moves */
44 void OPPROTO glue(op_load_fpr_DT0_fpr, REGNAME)(void)
46 CPU_DoubleU u;
47 uint32_t *p = (uint32_t *)®
48 u.l.lower = *(p +1);
49 u.l.upper = *p;
50 DT0 = u.d;
53 void OPPROTO glue(op_store_DT0_fpr_fpr, REGNAME)(void)
55 CPU_DoubleU u;
56 uint32_t *p = (uint32_t *)®
57 u.d = DT0;
58 *(p +1) = u.l.lower;
59 *p = u.l.upper;
62 void OPPROTO glue(op_load_fpr_DT1_fpr, REGNAME)(void)
64 CPU_DoubleU u;
65 uint32_t *p = (uint32_t *)®
66 u.l.lower = *(p +1);
67 u.l.upper = *p;
68 DT1 = u.d;
71 void OPPROTO glue(op_store_DT1_fpr_fpr, REGNAME)(void)
73 CPU_DoubleU u;
74 uint32_t *p = (uint32_t *)®
75 u.d = DT1;
76 *(p +1) = u.l.lower;
77 *p = u.l.upper;
80 #if defined(CONFIG_USER_ONLY)
81 /* quad floating point registers moves */
82 void OPPROTO glue(op_load_fpr_QT0_fpr, REGNAME)(void)
84 CPU_QuadU u;
85 uint32_t *p = (uint32_t *)®
86 u.l.lowest = *(p + 3);
87 u.l.lower = *(p + 2);
88 u.l.upper = *(p + 1);
89 u.l.upmost = *p;
90 QT0 = u.q;
93 void OPPROTO glue(op_store_QT0_fpr_fpr, REGNAME)(void)
95 CPU_QuadU u;
96 uint32_t *p = (uint32_t *)®
97 u.q = QT0;
98 *(p + 3) = u.l.lowest;
99 *(p + 2) = u.l.lower;
100 *(p + 1) = u.l.upper;
101 *p = u.l.upmost;
104 void OPPROTO glue(op_load_fpr_QT1_fpr, REGNAME)(void)
106 CPU_QuadU u;
107 uint32_t *p = (uint32_t *)®
108 u.l.lowest = *(p + 3);
109 u.l.lower = *(p + 2);
110 u.l.upper = *(p + 1);
111 u.l.upmost = *p;
112 QT1 = u.q;
115 void OPPROTO glue(op_store_QT1_fpr_fpr, REGNAME)(void)
117 CPU_QuadU u;
118 uint32_t *p = (uint32_t *)®
119 u.q = QT1;
120 *(p + 3) = u.l.lowest;
121 *(p + 2) = u.l.lower;
122 *(p + 1) = u.l.upper;
123 *p = u.l.upmost;
125 #endif
127 #undef REG
128 #undef REGNAME