]> git.proxmox.com Git - qemu.git/blob - target-ppc/op_helper.h
target-ppc: convert SPE FP ops to TCG
[qemu.git] / target-ppc / op_helper.h
1 /*
2 * PowerPC emulation helpers header for qemu.
3 *
4 * Copyright (c) 2003-2007 Jocelyn Mayer
5 *
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.
10 *
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.
15 *
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
19 */
20
21 #if defined(MEMSUFFIX)
22
23 /* Memory load/store helpers */
24 void glue(do_lsw, MEMSUFFIX) (int dst);
25 void glue(do_stsw, MEMSUFFIX) (int src);
26 void glue(do_lmw, MEMSUFFIX) (int dst);
27 void glue(do_lmw_le, MEMSUFFIX) (int dst);
28 void glue(do_stmw, MEMSUFFIX) (int src);
29 void glue(do_stmw_le, MEMSUFFIX) (int src);
30 void glue(do_icbi, MEMSUFFIX) (void);
31 void glue(do_dcbz, MEMSUFFIX) (void);
32 void glue(do_POWER_lscbx, MEMSUFFIX) (int dest, int ra, int rb);
33 void glue(do_POWER2_lfq, MEMSUFFIX) (void);
34 void glue(do_POWER2_lfq_le, MEMSUFFIX) (void);
35 void glue(do_POWER2_stfq, MEMSUFFIX) (void);
36 void glue(do_POWER2_stfq_le, MEMSUFFIX) (void);
37
38 #if defined(TARGET_PPC64)
39 void glue(do_lsw_64, MEMSUFFIX) (int dst);
40 void glue(do_stsw_64, MEMSUFFIX) (int src);
41 void glue(do_lmw_64, MEMSUFFIX) (int dst);
42 void glue(do_lmw_le_64, MEMSUFFIX) (int dst);
43 void glue(do_stmw_64, MEMSUFFIX) (int src);
44 void glue(do_stmw_le_64, MEMSUFFIX) (int src);
45 void glue(do_icbi_64, MEMSUFFIX) (void);
46 void glue(do_dcbz_64, MEMSUFFIX) (void);
47 #endif
48
49 #else
50
51 void do_print_mem_EA (target_ulong EA);
52
53 /* Registers load and stores */
54 void do_load_cr (void);
55 void do_store_cr (uint32_t mask);
56 #if defined(TARGET_PPC64)
57 void do_store_pri (int prio);
58 #endif
59 target_ulong ppc_load_dump_spr (int sprn);
60 void ppc_store_dump_spr (int sprn, target_ulong val);
61
62 /* Misc */
63 void do_tw (int flags);
64 #if defined(TARGET_PPC64)
65 void do_td (int flags);
66 #endif
67 #if !defined(CONFIG_USER_ONLY)
68 void do_store_msr (void);
69 void do_rfi (void);
70 #if defined(TARGET_PPC64)
71 void do_rfid (void);
72 void do_hrfid (void);
73 #endif
74 void do_load_6xx_tlb (int is_code);
75 void do_load_74xx_tlb (int is_code);
76 #endif
77
78 /* POWER / PowerPC 601 specific helpers */
79 void do_POWER_abso (void);
80 void do_POWER_clcs (void);
81 void do_POWER_div (void);
82 void do_POWER_divo (void);
83 void do_POWER_divs (void);
84 void do_POWER_divso (void);
85 void do_POWER_dozo (void);
86 void do_POWER_maskg (void);
87 void do_POWER_mulo (void);
88 #if !defined(CONFIG_USER_ONLY)
89 void do_POWER_rac (void);
90 void do_POWER_rfsvc (void);
91 void do_store_hid0_601 (void);
92 #endif
93
94 /* PowerPC 602 specific helper */
95 #if !defined(CONFIG_USER_ONLY)
96 void do_op_602_mfrom (void);
97 #endif
98
99 /* PowerPC 440 specific helpers */
100 #if !defined(CONFIG_USER_ONLY)
101 void do_440_tlbre (int word);
102 void do_440_tlbwe (int word);
103 #endif
104
105 /* PowerPC 4xx specific helpers */
106 void do_load_dcr (void);
107 void do_store_dcr (void);
108 #if !defined(CONFIG_USER_ONLY)
109 void do_40x_rfci (void);
110 void do_rfci (void);
111 void do_rfdi (void);
112 void do_rfmci (void);
113 void do_4xx_tlbre_lo (void);
114 void do_4xx_tlbre_hi (void);
115 void do_4xx_tlbwe_lo (void);
116 void do_4xx_tlbwe_hi (void);
117 #endif
118
119 /* PowerPC 440 specific helpers */
120 void do_440_dlmzb (void);
121
122 /* PowerPC 403 specific helpers */
123 #if !defined(CONFIG_USER_ONLY)
124 void do_load_403_pb (int num);
125 void do_store_403_pb (int num);
126 #endif
127
128 #endif