| 1 |
/* |
| 2 |
* Cisco router simulation platform. |
| 3 |
* Copyright (c) 2006 Christophe Fillot ([email protected]) |
| 4 |
* |
| 5 |
* Just an empty JIT template file for architectures not supported by the JIT |
| 6 |
* code. |
| 7 |
*/ |
| 8 |
|
| 9 |
#include <stdio.h> |
| 10 |
#include <stdlib.h> |
| 11 |
#include <unistd.h> |
| 12 |
#include <string.h> |
| 13 |
#include <sys/types.h> |
| 14 |
#include <sys/stat.h> |
| 15 |
#include <fcntl.h> |
| 16 |
|
| 17 |
#include "cpu.h" |
| 18 |
#include "mips64_jit.h" |
| 19 |
#include "mips64_nojit_trans.h" |
| 20 |
|
| 21 |
/* Set an IRQ */ |
| 22 |
void mips64_set_irq(cpu_mips_t *cpu,m_uint8_t irq) |
| 23 |
{ |
| 24 |
m_uint32_t m; |
| 25 |
m = (1 << (irq + MIPS_CP0_CAUSE_ISHIFT)) & MIPS_CP0_CAUSE_IMASK; |
| 26 |
MIPS64_IRQ_LOCK(cpu); |
| 27 |
cpu->irq_cause |= m; |
| 28 |
MIPS64_IRQ_UNLOCK(cpu); |
| 29 |
} |
| 30 |
|
| 31 |
/* Clear an IRQ */ |
| 32 |
void mips64_clear_irq(cpu_mips_t *cpu,m_uint8_t irq) |
| 33 |
{ |
| 34 |
m_uint32_t m; |
| 35 |
|
| 36 |
m = (1 << (irq + MIPS_CP0_CAUSE_ISHIFT)) & MIPS_CP0_CAUSE_IMASK; |
| 37 |
MIPS64_IRQ_LOCK(cpu); |
| 38 |
cpu->irq_cause &= ~m; |
| 39 |
MIPS64_IRQ_UNLOCK(cpu); |
| 40 |
|
| 41 |
if (!cpu->irq_cause) |
| 42 |
cpu->irq_pending = 0; |
| 43 |
} |
| 44 |
|
| 45 |
#define EMPTY(func) func { \ |
| 46 |
fprintf(stderr,"This function should not be called: "#func"\n"); \ |
| 47 |
abort(); \ |
| 48 |
} |
| 49 |
|
| 50 |
EMPTY(void mips64_jit_tcb_push_epilog(cpu_tc_t *tc)); |
| 51 |
EMPTY(void mips64_jit_tcb_exec(cpu_mips_t *cpu,cpu_tb_t *tb)); |
| 52 |
EMPTY(void mips64_set_pc(cpu_tc_t *tc,m_uint64_t new_pc)); |
| 53 |
EMPTY(void mips64_set_ra(cpu_tc_t *tc,m_uint64_t ret_pc)); |
| 54 |
EMPTY(void mips64_emit_breakpoint(cpu_tc_t *tc)); |
| 55 |
EMPTY(void mips64_emit_single_step(cpu_tc_t *tc,mips_insn_t insn)); |
| 56 |
EMPTY(int mips64_emit_invalid_delay_slot(cpu_tc_t *tc)); |
| 57 |
EMPTY(void mips64_inc_cp0_count_reg(cpu_tc_t *tc)); |
| 58 |
EMPTY(void mips64_check_pending_irq(cpu_tc_t *tc)); |
| 59 |
EMPTY(void mips64_inc_perf_counter(cpu_tc_t *tc)); |
| 60 |
|
| 61 |
/* MIPS instruction array */ |
| 62 |
struct mips64_insn_tag mips64_insn_tags[] = { |
| 63 |
{ NULL, 0, 0, 0 }, |
| 64 |
}; |