Statistics
| Branch: | Revision:

root / target-cris / exec.h @ 0d84be5b

History | View | Annotate | Download (1.4 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
#if !defined(CONFIG_USER_ONLY)
28 81fdc5f8 ths
#include "softmmu_exec.h"
29 81fdc5f8 ths
#endif
30 81fdc5f8 ths
31 81fdc5f8 ths
void cpu_cris_flush_flags(CPUCRISState *env, int cc_op);
32 81fdc5f8 ths
void helper_movec(CPUCRISState *env, int reg, uint32_t val);
33 81fdc5f8 ths
34 6a4955a8 aliguori
static inline int cpu_has_work(CPUState *env)
35 6a4955a8 aliguori
{
36 6a4955a8 aliguori
    return (env->interrupt_request & (CPU_INTERRUPT_HARD | CPU_INTERRUPT_NMI));
37 6a4955a8 aliguori
}
38 6a4955a8 aliguori
39 81fdc5f8 ths
static inline int cpu_halted(CPUState *env) {
40 81fdc5f8 ths
        if (!env->halted)
41 81fdc5f8 ths
                return 0;
42 69b5cae1 edgar_igl
43 69b5cae1 edgar_igl
        /* IRQ, NMI and GURU execeptions wakes us up.  */
44 69b5cae1 edgar_igl
        if (env->interrupt_request
45 69b5cae1 edgar_igl
            & (CPU_INTERRUPT_HARD | CPU_INTERRUPT_NMI)) {
46 81fdc5f8 ths
                env->halted = 0;
47 81fdc5f8 ths
                return 0;
48 81fdc5f8 ths
        }
49 81fdc5f8 ths
        return EXCP_HALTED;
50 81fdc5f8 ths
}