diff options
author | 2008-04-19 19:09:24 +0000 | |
---|---|---|
committer | 2008-04-19 19:09:24 +0000 | |
commit | 9dd3f691ba252c9bc1653a7efdada7041ec609c1 (patch) | |
tree | 1b0537929df97cd3782c328a42d672034f49dd12 /src/emu/cpu/mips/mips3com.c | |
parent | 446e65fb98772f68ff762d321d7187a238069524 (diff) |
Expanded the set of memory accessor functions. In addition to
direct byte, word, dword, and qword accessors for all bus sizes,
there are now masked word, dword, and qword accessors for all
bus sizes.
IMPORTANT: masks that are passed to the _masked_* functions are
NOT inverted. Although inverted masks are still passed to callback
functions, when you request a masked read or write the masks should
represent the bits you want.
Updated the various MIPS cores that use these functions to invert
their masks.
Diffstat (limited to 'src/emu/cpu/mips/mips3com.c')
-rw-r--r-- | src/emu/cpu/mips/mips3com.c | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/src/emu/cpu/mips/mips3com.c b/src/emu/cpu/mips/mips3com.c index af3d7132c14..2e10d38d6a4 100644 --- a/src/emu/cpu/mips/mips3com.c +++ b/src/emu/cpu/mips/mips3com.c @@ -29,11 +29,6 @@ static UINT32 compute_prid_register(const mips3_state *mips); static void tlb_write_common(mips3_state *mips, int index); static void tlb_entry_log_half(mips3_tlb_entry *tlbent, int index, int which); -static UINT64 program_read_qword_masked_32be(offs_t offset, UINT64 mem_mask); -static void program_write_qword_masked_32be(offs_t offset, UINT64 data, UINT64 mem_mask); -static UINT64 program_read_qword_masked_32le(offs_t offset, UINT64 mem_mask); -static void program_write_qword_masked_32le(offs_t offset, UINT64 data, UINT64 mem_mask); - /*************************************************************************** @@ -860,68 +855,3 @@ static void tlb_entry_log_half(mips3_tlb_entry *tlbent, int index, int which) asid, r, c, (lo & 4) ? 'd' : '.', (lo & 2) ? 'v' : '.', (hi & 0x1000) ? 'g' : '.'); #endif } - - - -/*************************************************************************** - DOUBLEWORD READS/WRITES -***************************************************************************/ - -/*------------------------------------------------- - program_read_qword_masked_32be - read a 64-bit - big-endian value with explicit masking --------------------------------------------------*/ - -static UINT64 program_read_qword_masked_32be(offs_t offset, UINT64 mem_mask) -{ - UINT64 result = 0; - if (ACCESSING_BITS_32_63) - result |= (UINT64)program_read_dword_masked_32be(offset, mem_mask >> 32) << 32; - if (ACCESSING_BITS_0_31) - result |= program_read_dword_masked_32be(offset + 4, mem_mask); - return result; -} - - -/*------------------------------------------------- - program_read_qword_masked_32le - read a 64-bit - little-endian value with explicit masking --------------------------------------------------*/ - -static UINT64 program_read_qword_masked_32le(offs_t offset, UINT64 mem_mask) -{ - UINT64 result = 0; - if (ACCESSING_BITS_0_31) - result |= program_read_dword_masked_32le(offset, mem_mask); - if (ACCESSING_BITS_32_63) - result |= (UINT64)program_read_dword_masked_32le(offset + 4, mem_mask >> 32) << 32; - return result; -} - - -/*------------------------------------------------- - program_write_qword_masked_32be - write a - 64-bit big-endian value with explicit masking --------------------------------------------------*/ - -static void program_write_qword_masked_32be(offs_t offset, UINT64 data, UINT64 mem_mask) -{ - if (ACCESSING_BITS_32_63) - program_write_dword_masked_32be(offset, data >> 32, mem_mask >> 32); - if (ACCESSING_BITS_0_31) - program_write_dword_masked_32be(offset + 4, data, mem_mask); -} - - -/*------------------------------------------------- - program_write_qword_masked_32le - write a - 64-bit little-endian value with explicit masking --------------------------------------------------*/ - -static void program_write_qword_masked_32le(offs_t offset, UINT64 data, UINT64 mem_mask) -{ - if (ACCESSING_BITS_0_31) - program_write_dword_masked_32le(offset, data, mem_mask); - if (ACCESSING_BITS_32_63) - program_write_dword_masked_32le(offset + 4, data >> 32, mem_mask >> 32); -} |