diff options
author | 2009-03-12 16:54:49 +0000 | |
---|---|---|
committer | 2009-03-12 16:54:49 +0000 | |
commit | 32bc986ec0d0b5bd47a18f5970d910df41bf38f9 (patch) | |
tree | c0cd3b83af4924101d85cdcc1403abe88f6de55e /src/emu/cpu/vtlb.c | |
parent | 1d85ed15092aa1fabc3b9bcc05610d1f8917a01d (diff) |
Moved some of the CPU cores over to use get_safe_token like other devices.
Also cleaned them so they compile.
Diffstat (limited to 'src/emu/cpu/vtlb.c')
-rw-r--r-- | src/emu/cpu/vtlb.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/emu/cpu/vtlb.c b/src/emu/cpu/vtlb.c index eb4c94fe660..de4a755e17a 100644 --- a/src/emu/cpu/vtlb.c +++ b/src/emu/cpu/vtlb.c @@ -60,7 +60,7 @@ vtlb_state *vtlb_alloc(const device_config *cpu, int space, int fixed_entries, i vtlb_state *vtlb; /* allocate memory for the core structure */ - vtlb = malloc_or_die(sizeof(*vtlb)); + vtlb = (vtlb_state *)malloc_or_die(sizeof(*vtlb)); memset(vtlb, 0, sizeof(*vtlb)); /* fill in CPU information */ @@ -78,19 +78,19 @@ vtlb_state *vtlb_alloc(const device_config *cpu, int space, int fixed_entries, i assert(vtlb->addrwidth > vtlb->pageshift); /* allocate the entry array */ - vtlb->live = malloc_or_die(sizeof(vtlb->live[0]) * (fixed_entries + dynamic_entries)); + vtlb->live = (offs_t *)malloc_or_die(sizeof(vtlb->live[0]) * (fixed_entries + dynamic_entries)); memset(vtlb->live, 0, sizeof(vtlb->live[0]) * (fixed_entries + dynamic_entries)); state_save_register_device_item_pointer(cpu, space, vtlb->live, fixed_entries + dynamic_entries); /* allocate the lookup table */ - vtlb->table = malloc_or_die(sizeof(vtlb->table[0]) << (vtlb->addrwidth - vtlb->pageshift)); + vtlb->table = (vtlb_entry *)malloc_or_die(sizeof(vtlb->table[0]) << (vtlb->addrwidth - vtlb->pageshift)); memset(vtlb->table, 0, sizeof(vtlb->table[0]) << (vtlb->addrwidth - vtlb->pageshift)); state_save_register_device_item_pointer(cpu, space, vtlb->table, 1 << (vtlb->addrwidth - vtlb->pageshift)); /* allocate the fixed page count array */ if (fixed_entries > 0) { - vtlb->fixedpages = malloc_or_die(sizeof(vtlb->fixedpages[0]) * fixed_entries); + vtlb->fixedpages = (int *)malloc_or_die(sizeof(vtlb->fixedpages[0]) * fixed_entries); memset(vtlb->fixedpages, 0, sizeof(vtlb->fixedpages[0]) * fixed_entries); state_save_register_device_item_pointer(cpu, space, vtlb->fixedpages, fixed_entries); } |