Statistics
| Branch: | Revision:

root / target-cris / exec.h @ 94cff60a

History | View | Annotate | Download (1.9 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 81fdc5f8 ths
 * License along with this library; if not, write to the Free Software
19 81fdc5f8 ths
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20 81fdc5f8 ths
 */
21 81fdc5f8 ths
#include "dyngen-exec.h"
22 81fdc5f8 ths
23 81fdc5f8 ths
#if 1
24 81fdc5f8 ths
register struct CPUCRISState *env asm(AREG0);
25 81fdc5f8 ths
/* This is only used for tb lookup.  */
26 81fdc5f8 ths
register uint32_t T0 asm(AREG1);
27 81fdc5f8 ths
register uint32_t T1 asm(AREG2);
28 81fdc5f8 ths
#else
29 81fdc5f8 ths
struct CPUCRISState *env;
30 81fdc5f8 ths
/* This is only used for tb lookup.  */
31 81fdc5f8 ths
uint32_t T0;
32 81fdc5f8 ths
uint32_t T1;
33 81fdc5f8 ths
#endif
34 81fdc5f8 ths
#include "cpu.h"
35 81fdc5f8 ths
#include "exec-all.h"
36 81fdc5f8 ths
37 81fdc5f8 ths
#define RETURN() __asm__ __volatile__("" : : : "memory");
38 81fdc5f8 ths
39 81fdc5f8 ths
static inline void env_to_regs(void)
40 81fdc5f8 ths
{
41 81fdc5f8 ths
}
42 81fdc5f8 ths
43 81fdc5f8 ths
static inline void regs_to_env(void)
44 81fdc5f8 ths
{
45 81fdc5f8 ths
}
46 81fdc5f8 ths
47 81fdc5f8 ths
int cpu_cris_handle_mmu_fault (CPUState *env, target_ulong address, int rw,
48 81fdc5f8 ths
                              int is_user, int is_softmmu);
49 81fdc5f8 ths
void tlb_fill (target_ulong addr, int is_write, int is_user, void *retaddr);
50 81fdc5f8 ths
51 81fdc5f8 ths
#if !defined(CONFIG_USER_ONLY)
52 81fdc5f8 ths
#include "softmmu_exec.h"
53 81fdc5f8 ths
#endif
54 81fdc5f8 ths
55 81fdc5f8 ths
void cpu_cris_flush_flags(CPUCRISState *env, int cc_op);
56 81fdc5f8 ths
void helper_movec(CPUCRISState *env, int reg, uint32_t val);
57 81fdc5f8 ths
58 81fdc5f8 ths
void cpu_loop_exit(void);
59 81fdc5f8 ths
60 81fdc5f8 ths
static inline int cpu_halted(CPUState *env) {
61 81fdc5f8 ths
        if (!env->halted)
62 81fdc5f8 ths
                return 0;
63 81fdc5f8 ths
        if (env->interrupt_request & CPU_INTERRUPT_HARD) {
64 81fdc5f8 ths
                env->halted = 0;
65 81fdc5f8 ths
                return 0;
66 81fdc5f8 ths
        }
67 81fdc5f8 ths
        return EXCP_HALTED;
68 81fdc5f8 ths
}