]>
git.proxmox.com Git - mirror_qemu.git/blob - target-alpha/op.c
2 * Alpha emulation cpu micro-operations for qemu.
4 * Copyright (c) 2007 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
25 #include "host-utils.h"
26 #include "op_helper.h"
29 void OPPROTO
op_no_op (void)
31 #if !defined (DEBUG_OP)
32 __asm__
__volatile__("nop" : : : "memory");
38 #define MEMSUFFIX _raw
40 #if !defined(CONFIG_USER_ONLY)
41 #define MEMSUFFIX _kernel
43 #define MEMSUFFIX _executive
45 #define MEMSUFFIX _supervisor
47 #define MEMSUFFIX _user
49 /* This is used for pal modes */
50 #define MEMSUFFIX _data
54 /* PALcode support special instructions */
55 #if !defined (CONFIG_USER_ONLY)
56 void OPPROTO
op_hw_rei (void)
58 env
->pc
= env
->ipr
[IPR_EXC_ADDR
] & ~3;
59 env
->ipr
[IPR_EXC_ADDR
] = env
->ipr
[IPR_EXC_ADDR
] & 1;
60 /* XXX: re-enable interrupts and memory mapping */
64 void OPPROTO
op_hw_ret (void)
67 env
->ipr
[IPR_EXC_ADDR
] = T0
& 1;
68 /* XXX: re-enable interrupts and memory mapping */
72 void OPPROTO
op_mfpr (void)
74 helper_mfpr(PARAM(1));
78 void OPPROTO
op_mtpr (void)
80 helper_mtpr(PARAM(1));
84 void OPPROTO
op_set_alt_mode (void)
86 env
->saved_mode
= env
->ps
& 0xC;
87 env
->ps
= (env
->ps
& ~0xC) | (env
->ipr
[IPR_ALT_MODE
] & 0xC);
91 void OPPROTO
op_restore_mode (void)
93 env
->ps
= (env
->ps
& ~0xC) | env
->saved_mode
;
97 void OPPROTO
op_ld_phys_to_virt (void)
99 helper_ld_phys_to_virt();
103 void OPPROTO
op_st_phys_to_virt (void)
105 helper_st_phys_to_virt();
108 #endif /* !defined (CONFIG_USER_ONLY) */