1 |
/* |
/* |
2 |
* Copyright (C) 2005 Anders Gavare. All rights reserved. |
* Copyright (C) 2005-2006 Anders Gavare. All rights reserved. |
3 |
* |
* |
4 |
* Redistribution and use in source and binary forms, with or without |
* Redistribution and use in source and binary forms, with or without |
5 |
* modification, are permitted provided that the following conditions are met: |
* modification, are permitted provided that the following conditions are met: |
25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: cpu_i960.c,v 1.4 2005/11/13 00:14:07 debug Exp $ |
* $Id: cpu_i960.c,v 1.11 2006/07/20 21:52:59 debug Exp $ |
29 |
* |
* |
30 |
* Intel i960 CPU emulation. |
* Intel i960 CPU emulation. |
31 |
*/ |
*/ |
60 |
if (strcasecmp(cpu_type_name, "i960") != 0) |
if (strcasecmp(cpu_type_name, "i960") != 0) |
61 |
return 0; |
return 0; |
62 |
|
|
63 |
|
cpu->run_instr = i960_run_instr; |
64 |
cpu->memory_rw = i960_memory_rw; |
cpu->memory_rw = i960_memory_rw; |
65 |
cpu->update_translation_table = i960_update_translation_table; |
cpu->update_translation_table = i960_update_translation_table; |
66 |
cpu->invalidate_translation_caches = |
cpu->invalidate_translation_caches = |
120 |
symbol = get_symbol_name(&cpu->machine->symbol_context, |
symbol = get_symbol_name(&cpu->machine->symbol_context, |
121 |
cpu->pc, &offset); |
cpu->pc, &offset); |
122 |
|
|
123 |
debug("cpu%i: pc = 0x%08x", x, (int)cpu->pc); |
debug("cpu%i: pc = 0x%08"PRIx32, x, (uint32_t)cpu->pc); |
124 |
debug(" <%s>\n", symbol != NULL? symbol : " no symbol "); |
debug(" <%s>\n", symbol != NULL? symbol : " no symbol "); |
125 |
} |
} |
126 |
} |
} |
150 |
|
|
151 |
|
|
152 |
/* |
/* |
153 |
|
* i960_cpu_tlbdump(): |
154 |
|
* |
155 |
|
* Called from the debugger to dump the TLB in a readable format. |
156 |
|
* x is the cpu number to dump, or -1 to dump all CPUs. |
157 |
|
* |
158 |
|
* If rawflag is nonzero, then the TLB contents isn't formated nicely, |
159 |
|
* just dumped. |
160 |
|
*/ |
161 |
|
void i960_cpu_tlbdump(struct machine *m, int x, int rawflag) |
162 |
|
{ |
163 |
|
} |
164 |
|
|
165 |
|
|
166 |
|
/* |
167 |
|
* i960_cpu_gdb_stub(): |
168 |
|
* |
169 |
|
* Execute a "remote GDB" command. Returns a newly allocated response string |
170 |
|
* on success, NULL on failure. |
171 |
|
*/ |
172 |
|
char *i960_cpu_gdb_stub(struct cpu *cpu, char *cmd) |
173 |
|
{ |
174 |
|
fatal("i960_cpu_gdb_stub(): TODO\n"); |
175 |
|
return NULL; |
176 |
|
} |
177 |
|
|
178 |
|
|
179 |
|
/* |
180 |
* i960_cpu_interrupt(): |
* i960_cpu_interrupt(): |
181 |
*/ |
*/ |
182 |
int i960_cpu_interrupt(struct cpu *cpu, uint64_t irq_nr) |
int i960_cpu_interrupt(struct cpu *cpu, uint64_t irq_nr) |
217 |
* cpu->pc for relative addresses. |
* cpu->pc for relative addresses. |
218 |
*/ |
*/ |
219 |
int i960_cpu_disassemble_instr(struct cpu *cpu, unsigned char *ib, |
int i960_cpu_disassemble_instr(struct cpu *cpu, unsigned char *ib, |
220 |
int running, uint64_t dumpaddr, int bintrans) |
int running, uint64_t dumpaddr) |
221 |
{ |
{ |
222 |
uint64_t offset; |
uint64_t offset; |
223 |
int len = 0; |
int len = 0; |