cpu_ppc.cc File Reference

Back to the index.

Macros | Functions
cpu_ppc.cc File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "cpu.h"
#include "devices.h"
#include "interrupt.h"
#include "machine.h"
#include "memory.h"
#include "misc.h"
#include "of.h"
#include "opcodes_ppc.h"
#include "ppc_spr_strings.h"
#include "settings.h"
#include "symbol.h"
#include "thirdparty/ppc_bat.h"
#include "thirdparty/ppc_pte.h"
#include "thirdparty/ppc_spr.h"
#include "tmp_ppc_head.cc"
#include "memory_ppc.cc"
#include "tmp_ppc_tail.cc"

Go to the source code of this file.

Macros

#define DYNTRANS_DUALMODE_32
 

Functions

void ppc_pc_to_pointers (struct cpu *)
 
void ppc32_pc_to_pointers (struct cpu *)
 
void ppc_irq_interrupt_assert (struct interrupt *interrupt)
 
void ppc_irq_interrupt_deassert (struct interrupt *interrupt)
 
int ppc_cpu_new (struct cpu *cpu, struct memory *mem, struct machine *machine, int cpu_id, char *cpu_type_name)
 
void ppc_cpu_list_available_types (void)
 
void ppc_cpu_dumpinfo (struct cpu *cpu)
 
void reg_access_msr (struct cpu *cpu, uint64_t *valuep, int writeflag, int check_for_interrupts)
 
void ppc_exception (struct cpu *cpu, int exception_nr)
 
void ppc_cpu_register_dump (struct cpu *cpu, int gprs, int coprocs)
 
void ppc_cpu_tlbdump (struct machine *m, int x, int rawflag)
 
int ppc_cpu_disassemble_instr (struct cpu *cpu, unsigned char *instr, int running, uint64_t dumpaddr)
 
void update_cr0 (struct cpu *cpu, uint64_t value)
 

Macro Definition Documentation

◆ DYNTRANS_DUALMODE_32

#define DYNTRANS_DUALMODE_32

Definition at line 52 of file cpu_ppc.cc.

Function Documentation

◆ ppc32_pc_to_pointers()

void ppc32_pc_to_pointers ( struct cpu )

Referenced by ppc_exception().

◆ ppc_cpu_disassemble_instr()

int ppc_cpu_disassemble_instr ( struct cpu cpu,
unsigned char *  instr,
int  running,
uint64_t  dumpaddr 
)

Definition at line 633 of file cpu_ppc.cc.

References addr, ppc_cpu::bits, cpu::cd, cpu::cpu_id, debug, get_symbol_name(), ppc_cpu::gpr, if(), load(), cpu::machine, ppc_cpu::mode, MODE_POWER, machine::ncpus, cpu::pc, cpu::ppc, PPC_19_BCCTR, PPC_19_BCLR, PPC_19_CRAND, PPC_19_CRANDC, PPC_19_CREQV, PPC_19_CRNAND, PPC_19_CRNOR, PPC_19_CROR, PPC_19_CRORC, PPC_19_CRXOR, PPC_19_ISYNC, PPC_19_MCRF, PPC_19_RFI, PPC_19_RFID, PPC_19_RFSVC, PPC_30_RLDICL, PPC_30_RLDICR, PPC_30_RLDIMI, PPC_31_ADD, PPC_31_ADDC, PPC_31_ADDCO, PPC_31_ADDE, PPC_31_ADDEO, PPC_31_ADDME, PPC_31_ADDMEO, PPC_31_ADDO, PPC_31_ADDZE, PPC_31_ADDZEO, PPC_31_CMP, PPC_31_CMPL, PPC_31_LBZUX, PPC_31_LBZX, PPC_31_LDARX, PPC_31_LFDX, PPC_31_LFSX, PPC_31_LHAUX, PPC_31_LHAX, PPC_31_LHBRX, PPC_31_LHZUX, PPC_31_LHZX, PPC_31_LWARX, PPC_31_LWBRX, PPC_31_LWZUX, PPC_31_LWZX, PPC_31_MFCR, PPC_31_MFMSR, PPC_31_MFSPR, PPC_31_MFSR, PPC_31_MFSRIN, PPC_31_MTCRF, PPC_31_MTMSR, PPC_31_MTMSRD, PPC_31_MTSR, PPC_31_MTSRIN, PPC_31_MULHW, PPC_31_MULHWU, PPC_31_MULLW, PPC_31_MULLWO, PPC_31_NEG, PPC_31_NEGO, PPC_31_STBUX, PPC_31_STBX, PPC_31_STDCX_DOT, PPC_31_STDUX, PPC_31_STDX, PPC_31_STFDX, PPC_31_STFSX, PPC_31_STHBRX, PPC_31_STHUX, PPC_31_STHX, PPC_31_STWBRX, PPC_31_STWCX_DOT, PPC_31_STWUX, PPC_31_STWX, PPC_31_SUBF, PPC_31_SUBFC, PPC_31_SUBFCO, PPC_31_SUBFE, PPC_31_SUBFEO, PPC_31_SUBFME, PPC_31_SUBFMEO, PPC_31_SUBFO, PPC_31_SUBFZE, PPC_31_SUBFZEO, PPC_31_TD, PPC_31_TW, PPC_31_WRTEEI, PPC_HI6_19, PPC_HI6_30, PPC_HI6_31, PPC_HI6_ADDI, PPC_HI6_ADDIC, PPC_HI6_ADDIC_DOT, PPC_HI6_ADDIS, PPC_HI6_ANDI_DOT, PPC_HI6_ANDIS_DOT, PPC_HI6_B, PPC_HI6_BC, PPC_HI6_CMPI, PPC_HI6_CMPLI, PPC_HI6_MULLI, PPC_HI6_ORI, PPC_HI6_ORIS, PPC_HI6_RLWIMI, PPC_HI6_RLWINM, PPC_HI6_RLWNM, PPC_HI6_SC, PPC_HI6_SUBFIC, PPC_HI6_XORI, PPC_HI6_XORIS, cpu::sh, and machine::symbol_context.

◆ ppc_cpu_dumpinfo()

void ppc_cpu_dumpinfo ( struct cpu cpu)

◆ ppc_cpu_list_available_types()

void ppc_cpu_list_available_types ( void  )

Definition at line 244 of file cpu_ppc.cc.

References debug, ppc_cpu_type_def::name, PPC_CPU_TYPE_DEFS, and strlen().

◆ ppc_cpu_new()

int ppc_cpu_new ( struct cpu cpu,
struct memory mem,
struct machine machine,
int  cpu_id,
char *  cpu_type_name 
)

Definition at line 71 of file cpu_ppc.cc.

References BAT_PP_RW, BAT_Vs, ppc_cpu_type_def::bits, ppc_cpu::bits, cpu::byte_order, cpu::cd, CPU_SETTINGS_ADD_REGISTER32, CPU_SETTINGS_ADD_REGISTER64, ppc_cpu::cpu_type, ppc_cpu::cr, ppc_cpu_type_def::dcache_shift, debug, EMUL_BIG_ENDIAN, interrupt::extra, ppc_cpu::fpr, ppc_cpu::fpscr, ppc_cpu::gpr, ppc_cpu_type_def::icache_shift, interrupt::interrupt_assert, interrupt::interrupt_deassert, interrupt_handler_register(), cpu::invalidate_code_translation, cpu::invalidate_translation_caches, cpu::is_32bit, ppc_cpu_type_def::l2cache_shift, interrupt::line, cpu::machine, cpu::memory_rw, ppc_cpu::mode, MODE_PPC, ppc_cpu::msr, ppc_cpu_type_def::name, interrupt::name, cpu::name, ppc_cpu::of_emul_addr, cpu::path, cpu::pc, machine::physical_ram_in_mb, cpu::ppc, ppc32_invalidate_code_translation(), ppc32_invalidate_translation_caches(), ppc32_run_instr(), ppc32_update_translation_table(), PPC_CPU_TYPE_DEFS, ppc_invalidate_code_translation(), ppc_invalidate_translation_caches(), ppc_irq_interrupt_assert(), ppc_irq_interrupt_deassert(), ppc_memory_rw(), PPC_NFPRS, PPC_NGPRS, ppc_run_instr(), ppc_translate_v2p(), ppc_update_translation_table(), machine::prom_emulation, ppc_cpu_type_def::pvr, cpu::run_instr, ppc_cpu::spr, SPR_CTR, SPR_DBAT0L, SPR_DBAT0U, SPR_DBAT1L, SPR_DBAT1U, SPR_DBAT2L, SPR_DBAT2U, SPR_DBAT3L, SPR_DBAT3U, SPR_DEC, SPR_HDEC, SPR_IBAT0L, SPR_IBAT0U, SPR_IBAT1L, SPR_IBAT1U, SPR_IBAT2L, SPR_IBAT2U, SPR_IBAT3L, SPR_IBAT3U, SPR_LR, SPR_PIR, SPR_PVR, SPR_SDR1, SPR_SRR0, SPR_SRR1, SPR_XER, ppc_cpu::sr, cpu::translate_v2p, and cpu::update_translation_table.

◆ ppc_cpu_register_dump()

void ppc_cpu_register_dump ( struct cpu cpu,
int  gprs,
int  coprocs 
)

◆ ppc_cpu_tlbdump()

void ppc_cpu_tlbdump ( struct machine m,
int  x,
int  rawflag 
)

Definition at line 596 of file cpu_ppc.cc.

◆ ppc_exception()

void ppc_exception ( struct cpu cpu,
int  exception_nr 
)

◆ ppc_irq_interrupt_assert()

void ppc_irq_interrupt_assert ( struct interrupt interrupt)

Definition at line 604 of file cpu_ppc.cc.

References cpu::cd, interrupt::extra, ppc_cpu::irq_asserted, and cpu::ppc.

Referenced by ppc_cpu_new().

◆ ppc_irq_interrupt_deassert()

void ppc_irq_interrupt_deassert ( struct interrupt interrupt)

Definition at line 614 of file cpu_ppc.cc.

References cpu::cd, interrupt::extra, ppc_cpu::irq_asserted, and cpu::ppc.

Referenced by ppc_cpu_new().

◆ ppc_pc_to_pointers()

void ppc_pc_to_pointers ( struct cpu )

Referenced by ppc_exception().

◆ reg_access_msr()

void reg_access_msr ( struct cpu cpu,
uint64_t *  valuep,
int  writeflag,
int  check_for_interrupts 
)

◆ update_cr0()

void update_cr0 ( struct cpu cpu,
uint64_t  value 
)

Definition at line 1833 of file cpu_ppc.cc.

References ppc_cpu::bits, cpu::cd, ppc_cpu::cr, cpu::ppc, ppc_cpu::spr, and SPR_XER.

Referenced by X().


Generated on Sun Sep 30 2018 16:05:18 for GXemul by doxygen 1.8.13