#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <string.h>
#include "cpu.h"
#include "machine.h"
#include "memory.h"
#include "settings.h"
#include "timer.h"
Go to the source code of this file.
Functions | |
struct cpu * | cpu_new (struct memory *mem, struct machine *machine, int cpu_id, char *name) |
void | cpu_destroy (struct cpu *cpu) |
void | cpu_tlbdump (struct machine *m, int x, int rawflag) |
int | cpu_disassemble_instr (struct machine *m, struct cpu *cpu, unsigned char *instr, int running, uint64_t addr) |
void | cpu_register_dump (struct machine *m, struct cpu *cpu, int gprs, int coprocs) |
void | cpu_functioncall_trace (struct cpu *cpu, uint64_t f) |
void | cpu_functioncall_trace_return (struct cpu *cpu) |
void | cpu_create_or_reset_tc (struct cpu *cpu) |
void | cpu_dumpinfo (struct machine *m, struct cpu *cpu) |
void | cpu_list_available_types (void) |
void | cpu_run_deinit (struct machine *machine) |
void | cpu_show_cycles (struct machine *machine, int forced) |
void | cpu_run_init (struct machine *machine) |
struct cpu_family * | cpu_family_ptr_by_number (int arch) |
void | cpu_init (void) |
Variables | |
size_t | dyntrans_cache_size |
void cpu_create_or_reset_tc | ( | struct cpu * | cpu | ) |
Definition at line 289 of file cpu.cc.
References DYNTRANS_CACHE_MARGIN, dyntrans_cache_size, INVALIDATE_ALL, cpu::invalidate_code_translation, N_BASE_TABLE_ENTRIES, cpu::translation_cache, cpu::translation_cache_cur_ofs, and zeroed_alloc().
Referenced by cpu_new().
void cpu_destroy | ( | struct cpu * | cpu | ) |
Definition at line 140 of file cpu.cc.
References cpu::path, cpu::settings, settings_destroy(), settings_remove(), and settings_remove_all().
Referenced by machine_destroy().
int cpu_disassemble_instr | ( | struct machine * | m, |
struct cpu * | cpu, | ||
unsigned char * | instr, | ||
int | running, | ||
uint64_t | addr | ||
) |
Definition at line 183 of file cpu.cc.
References addr, machine::cpu_family, cpu_family::disassemble_instr, fatal(), instr, and cpu::running.
Definition at line 318 of file cpu.cc.
References machine::cpu_family, cpu::cpu_id, debug, cpu_family::dumpinfo, fatal(), cpu::name, and cpu::running.
Referenced by machine_dumpinfo().
struct cpu_family* cpu_family_ptr_by_number | ( | int | arch | ) |
Definition at line 541 of file cpu.cc.
Referenced by emul_machine_setup(), machine_entry_register(), and machine_list_available_types_and_cpus().
void cpu_functioncall_trace | ( | struct cpu * | cpu, |
uint64_t | f | ||
) |
Definition at line 219 of file cpu.cc.
References machine::arch, ARCH_M88K, cpu::cd, machine::cpu_family, cpu::cpu_id, m88k_cpu::cr, f(), fatal(), cpu_family::functioncall_trace, get_symbol_name_and_n_args(), cpu::is_32bit, cpu::m88k, M88K_CR_PSR, M88K_PSR_MODE, cpu::machine, cpu::mem, memory_checksum(), machine::ncpus, machine::symbol_context, and cpu::trace_tree_depth.
Referenced by A__NAME_PC(), X(), and Y().
void cpu_functioncall_trace_return | ( | struct cpu * | cpu | ) |
Definition at line 275 of file cpu.cc.
References cpu::trace_tree_depth.
Referenced by arm_cpu_interpret_thumb_SLOW(), arm_pop(), X(), and Y().
void cpu_list_available_types | ( | void | ) |
Definition at line 335 of file cpu.cc.
References DEBUG_INDENTATION.
Referenced by machine_list_available_types_and_cpus().
Definition at line 58 of file cpu.cc.
References cpu::byte_order, CHECK_ALLOCATION, cpu_create_or_reset_tc(), cpu::cpu_id, EMUL_UNDEFINED_ENDIAN, cpu::machine, cpu::mem, cpu::memory_rw, cpu_family::name, cpu::name, machine::path, cpu::path, cpu::running, machine::settings, cpu::settings, settings_add(), SETTINGS_FORMAT_STRING, SETTINGS_FORMAT_YESNO, settings_new(), SETTINGS_TYPE_STRING, SETTINGS_TYPE_SUBSETTINGS, SETTINGS_TYPE_UINT8, strlen(), and zeroed_alloc().
Referenced by emul_machine_setup().
Definition at line 203 of file cpu.cc.
References machine::cpu_family, fatal(), and cpu_family::register_dump.
Referenced by arcbios_private_emul(), dec_jumptable_func(), luna88kprom_emul(), mvmeprom_emul(), playstation2_sifbios_emul(), and yamon_emul().
void cpu_run_deinit | ( | struct machine * | machine | ) |
Definition at line 368 of file cpu.cc.
References cpu_show_cycles(), machine::cpus, tick_functions::extra, tick_functions::f, tick_functions::n_entries, machine::show_nr_of_instructions, and machine::tick_functions.
void cpu_run_init | ( | struct machine * | machine | ) |
Definition at line 474 of file cpu.cc.
References machine::cpus, machine::ncpus, cpu::ninstrs, cpu::ninstrs_flush, cpu::ninstrs_show, cpu::ninstrs_since_gettimeofday, and cpu::starttime.
void cpu_show_cycles | ( | struct machine * | machine, |
int | forced | ||
) |
Definition at line 399 of file cpu.cc.
References machine::arch, ARCH_M88K, machine::bootstrap_cpu, cpu::cd, machine::cpus, m88k_cpu::cr, get_symbol_name(), cpu::has_been_idling, cpu::is_32bit, cpu::m88k, M88K_CR_PSR, M88K_PSR_MODE, cpu::machine, machine::ncpus, cpu::ninstrs, cpu::ninstrs_since_gettimeofday, cpu::pc, machine::show_nr_of_instructions, cpu::starttime, and machine::symbol_context.
Referenced by cpu_run_deinit().
void cpu_tlbdump | ( | struct machine * | m, |
int | x, | ||
int | rawflag | ||
) |
Definition at line 168 of file cpu.cc.
References machine::cpu_family, fatal(), and cpu_family::tlbdump.
size_t dyntrans_cache_size |
Definition at line 65 of file main.cc.
Referenced by cpu_create_or_reset_tc().