Statistics
| Branch: | Revision:

root / target-cris / exec.h @ 64e58fe5

History | View | Annotate | Download (1.5 kB)

1 81fdc5f8 ths
/*
2 81fdc5f8 ths
 *  CRIS execution defines
3 81fdc5f8 ths
 *
4 81fdc5f8 ths
 *  Copyright (c) 2007 AXIS Communications AB
5 81fdc5f8 ths
 *  Written by Edgar E. Iglesias
6 81fdc5f8 ths
 *
7 81fdc5f8 ths
 * This library is free software; you can redistribute it and/or
8 81fdc5f8 ths
 * modify it under the terms of the GNU Lesser General Public
9 81fdc5f8 ths
 * License as published by the Free Software Foundation; either
10 81fdc5f8 ths
 * version 2 of the License, or (at your option) any later version.
11 81fdc5f8 ths
 *
12 81fdc5f8 ths
 * This library is distributed in the hope that it will be useful,
13 81fdc5f8 ths
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 81fdc5f8 ths
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 81fdc5f8 ths
 * General Public License for more details.
16 81fdc5f8 ths
 *
17 81fdc5f8 ths
 * You should have received a copy of the GNU Lesser General Public
18 8167ee88 Blue Swirl
 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
19 81fdc5f8 ths
 */
20 81fdc5f8 ths
#include "dyngen-exec.h"
21 81fdc5f8 ths
22 81fdc5f8 ths
register struct CPUCRISState *env asm(AREG0);
23 31c18d87 edgar_igl
24 81fdc5f8 ths
#include "cpu.h"
25 81fdc5f8 ths
#include "exec-all.h"
26 81fdc5f8 ths
27 81fdc5f8 ths
static inline void env_to_regs(void)
28 81fdc5f8 ths
{
29 81fdc5f8 ths
}
30 81fdc5f8 ths
31 81fdc5f8 ths
static inline void regs_to_env(void)
32 81fdc5f8 ths
{
33 81fdc5f8 ths
}
34 81fdc5f8 ths
35 81fdc5f8 ths
#if !defined(CONFIG_USER_ONLY)
36 81fdc5f8 ths
#include "softmmu_exec.h"
37 81fdc5f8 ths
#endif
38 81fdc5f8 ths
39 81fdc5f8 ths
void cpu_cris_flush_flags(CPUCRISState *env, int cc_op);
40 81fdc5f8 ths
void helper_movec(CPUCRISState *env, int reg, uint32_t val);
41 81fdc5f8 ths
42 6a4955a8 aliguori
static inline int cpu_has_work(CPUState *env)
43 6a4955a8 aliguori
{
44 6a4955a8 aliguori
    return (env->interrupt_request & (CPU_INTERRUPT_HARD | CPU_INTERRUPT_NMI));
45 6a4955a8 aliguori
}
46 6a4955a8 aliguori
47 81fdc5f8 ths
static inline int cpu_halted(CPUState *env) {
48 81fdc5f8 ths
        if (!env->halted)
49 81fdc5f8 ths
                return 0;
50 69b5cae1 edgar_igl
51 69b5cae1 edgar_igl
        /* IRQ, NMI and GURU execeptions wakes us up.  */
52 69b5cae1 edgar_igl
        if (env->interrupt_request
53 69b5cae1 edgar_igl
            & (CPU_INTERRUPT_HARD | CPU_INTERRUPT_NMI)) {
54 81fdc5f8 ths
                env->halted = 0;
55 81fdc5f8 ths
                return 0;
56 81fdc5f8 ths
        }
57 81fdc5f8 ths
        return EXCP_HALTED;
58 81fdc5f8 ths
}