]>
git.proxmox.com Git - mirror_qemu.git/blob - target-mips/fop_template.c
2 * MIPS emulation micro-operations templates for floating point reg
3 * load & store for qemu.
5 * Copyright (c) 2006 Marius Groeger
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
24 #define OP_WLOAD_FREG(treg, tregname, SFREG) \
25 void glue(glue(op_load_fpr_,tregname), SFREG) (void) \
27 treg = FPR_W(env, SFREG); \
31 #define OP_WSTORE_FREG(treg, tregname, SFREG) \
32 void glue(glue(op_store_fpr_,tregname), SFREG) (void)\
34 FPR_W(env, SFREG) = treg; \
38 /* WT0 = SFREG.w: op_load_fpr_WT0_fprSFREG */
39 OP_WLOAD_FREG(WT0
, WT0_fpr
, SFREG
)
40 /* SFREG.w = WT0: op_store_fpr_WT0_fprSFREG */
41 OP_WSTORE_FREG(WT0
, WT0_fpr
, SFREG
)
43 OP_WLOAD_FREG(WT1
, WT1_fpr
, SFREG
)
44 OP_WSTORE_FREG(WT1
, WT1_fpr
, SFREG
)
46 OP_WLOAD_FREG(WT2
, WT2_fpr
, SFREG
)
47 OP_WSTORE_FREG(WT2
, WT2_fpr
, SFREG
)
53 #define OP_DLOAD_FREG(treg, tregname, DFREG) \
54 void glue(glue(op_load_fpr_,tregname), DFREG) (void) \
56 treg = FPR_D(env, DFREG); \
60 #define OP_DSTORE_FREG(treg, tregname, DFREG) \
61 void glue(glue(op_store_fpr_,tregname), DFREG) (void)\
63 FPR_D(env, DFREG) = treg; \
67 OP_DLOAD_FREG(DT0
, DT0_fpr
, DFREG
)
68 OP_DSTORE_FREG(DT0
, DT0_fpr
, DFREG
)
70 OP_DLOAD_FREG(DT1
, DT1_fpr
, DFREG
)
71 OP_DSTORE_FREG(DT1
, DT1_fpr
, DFREG
)
73 OP_DLOAD_FREG(DT2
, DT2_fpr
, DFREG
)
74 OP_DSTORE_FREG(DT2
, DT2_fpr
, DFREG
)
80 #define SET_RESET(treg, tregname) \
81 void glue(op_set, tregname)(void) \
86 void glue(op_reset, tregname)(void) \