2 * PowerPC emulation micro-operations for qemu.
4 * Copyright (c) 2003-2005 Jocelyn Mayer
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 /* General purpose registers moves */
22 void OPPROTO
glue(op_load_gpr_T0_gpr
, REG
)(void)
28 void OPPROTO
glue(op_load_gpr_T1_gpr
, REG
)(void)
34 void OPPROTO
glue(op_load_gpr_T2_gpr
, REG
)(void)
40 void OPPROTO
glue(op_store_T0_gpr_gpr
, REG
)(void)
46 void OPPROTO
glue(op_store_T1_gpr_gpr
, REG
)(void)
52 void OPPROTO
glue(op_store_T2_gpr_gpr
, REG
)(void)
59 /* Condition register moves */
60 void OPPROTO
glue(op_load_crf_T0_crf
, REG
)(void)
66 void OPPROTO
glue(op_load_crf_T1_crf
, REG
)(void)
72 void OPPROTO
glue(op_store_T0_crf_crf
, REG
)(void)
78 void OPPROTO
glue(op_store_T1_crf_crf
, REG
)(void)
84 /* Floating point condition and status register moves */
85 void OPPROTO
glue(op_load_fpscr_T0_fpscr
, REG
)(void)
87 T0
= regs
->fpscr
[REG
];
92 void OPPROTO
glue(op_store_T0_fpscr_fpscr
, REG
)(void)
94 regs
->fpscr
[REG
] = (regs
->fpscr
[REG
] & 0x9) | (T0
& ~0x9);
98 void OPPROTO
glue(op_store_T0_fpscri_fpscr
, REG
)(void)
100 regs
->fpscr
[REG
] = (regs
->fpscr
[REG
] & ~0x9) | (PARAM(1) & 0x9);
104 void OPPROTO
glue(op_clear_fpscr_fpscr
, REG
)(void)
106 regs
->fpscr
[REG
] = (regs
->fpscr
[REG
] & 0x9);
110 void OPPROTO
glue(op_store_T0_fpscr_fpscr
, REG
)(void)
112 regs
->fpscr
[REG
] = T0
;
116 void OPPROTO
glue(op_store_T0_fpscri_fpscr
, REG
)(void)
118 regs
->fpscr
[REG
] = PARAM(1);
122 void OPPROTO
glue(op_clear_fpscr_fpscr
, REG
)(void)
124 regs
->fpscr
[REG
] = 0x0;
129 #endif /* REG <= 7 */
131 /* floating point registers moves */
132 void OPPROTO
glue(op_load_fpr_FT0_fpr
, REG
)(void)
138 void OPPROTO
glue(op_store_FT0_fpr_fpr
, REG
)(void)
144 void OPPROTO
glue(op_load_fpr_FT1_fpr
, REG
)(void)
150 void OPPROTO
glue(op_store_FT1_fpr_fpr
, REG
)(void)
156 void OPPROTO
glue(op_load_fpr_FT2_fpr
, REG
)(void)
162 void OPPROTO
glue(op_store_FT2_fpr_fpr
, REG
)(void)
169 /* Segment register moves */
170 void OPPROTO
glue(op_load_sr
, REG
)(void)
176 void OPPROTO
glue(op_store_sr
, REG
)(void)
178 do_store_sr(env
, REG
, T0
);