summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/cpu/vtlb.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-11-10 08:51:06 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-11-10 08:51:06 +0000
commit6f4ee44948a6b31d23cf3afe41ea1b0388e05fb6 (patch)
tree6150ff2c9458dd88ae908e0be7ed5443a67d820d /src/emu/cpu/vtlb.c
parent92f305310513e310dcca7f5b1c3fe7ec2b197775 (diff)
Added CPU device parameters to all CPU callbacks except for the
context ones (which are going away), the disassembler (which should have no dependencies on the live CPU), and the validity check. Removed global token from all pointer-ified CPU cores that don't have internal read/write callbacks (which still need to reference it).
Diffstat (limited to 'src/emu/cpu/vtlb.c')
-rw-r--r--src/emu/cpu/vtlb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/emu/cpu/vtlb.c b/src/emu/cpu/vtlb.c
index f966046be25..f8992e1dcbc 100644
--- a/src/emu/cpu/vtlb.c
+++ b/src/emu/cpu/vtlb.c
@@ -30,6 +30,7 @@
/* VTLB state */
struct _vtlb_state
{
+ const device_config *device; /* CPU device */
int space; /* address space */
int dynamic; /* number of dynamic entries */
int fixed; /* number of fixed entries */
@@ -64,6 +65,7 @@ vtlb_state *vtlb_alloc(const device_config *cpu, int space, int fixed_entries, i
memset(vtlb, 0, sizeof(*vtlb));
/* fill in CPU information */
+ vtlb->device = cpu;
vtlb->space = space;
vtlb->dynamic = dynamic_entries;
vtlb->fixed = fixed_entries;
@@ -152,7 +154,7 @@ int vtlb_fill(vtlb_state *vtlb, offs_t address, int intention)
/* ask the CPU core to translate for us */
taddress = address;
- if (!(*vtlb->translate)(vtlb->space, intention, &taddress))
+ if (!(*vtlb->translate)(vtlb->device, vtlb->space, intention, &taddress))
{
if (PRINTF_TLB)
printf("failed: no translation\n");