diff options
author | 2008-03-30 09:19:23 +0000 | |
---|---|---|
committer | 2008-03-30 09:19:23 +0000 | |
commit | ad4ef5d25698e40e9d0f2fde7a09b832f755ef2e (patch) | |
tree | f434156b11b292bc88e9bc1753a19609c9e06192 /src/emu/cpu/mips/mips3com.c | |
parent | c646da31adf70865961d9c4fbb42104f3c54f79c (diff) |
New macros added for checking mem_mask. ACCESSING_BYTE_n, ACCESSING_WORD_n & ACCESSING_DWORD_n. These check for any access within the bounds, currently the pattern for checking whether both bytes of a word is written is to make two byte checks ( this pattern existed before because there was no macro for testing a 16 bit word, though you could have used ACCESSING_LSW32 ).
All occurrences of ACCESSING_LSB, ACCESSING_MSB, ACCESSING_LSB16, ACCESSING_MSB16, ACCESSING_LSB32, ACCESSING_MSB32, ACCESSING_LSW32, ACCESSING_MSW32 & simple mem_mask checks have been replace with the new macros.
The old macros are gone.
Diffstat (limited to 'src/emu/cpu/mips/mips3com.c')
-rw-r--r-- | src/emu/cpu/mips/mips3com.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/emu/cpu/mips/mips3com.c b/src/emu/cpu/mips/mips3com.c index 301b2a48c9d..b4216d33b26 100644 --- a/src/emu/cpu/mips/mips3com.c +++ b/src/emu/cpu/mips/mips3com.c @@ -894,9 +894,9 @@ static UINT64 program_read_qword_32be(offs_t offset) static UINT64 program_read_qword_masked_32be(offs_t offset, UINT64 mem_mask) { UINT64 result = 0; - if ((mem_mask & U64(0xffffffff00000000)) != U64(0xffffffff00000000)) + if (ACCESSING_DWORD_1) result |= (UINT64)program_read_masked_32be(offset, mem_mask >> 32) << 32; - if ((mem_mask & U64(0x00000000ffffffff)) != U64(0x00000000ffffffff)) + if (ACCESSING_DWORD_0) result |= program_read_masked_32be(offset + 4, mem_mask); return result; } @@ -922,9 +922,9 @@ static UINT64 program_read_qword_32le(offs_t offset) static UINT64 program_read_qword_masked_32le(offs_t offset, UINT64 mem_mask) { UINT64 result = 0; - if ((mem_mask & U64(0x00000000ffffffff)) != U64(0x00000000ffffffff)) + if (ACCESSING_DWORD_0) result |= program_read_masked_32le(offset, mem_mask); - if ((mem_mask & U64(0xffffffff00000000)) != U64(0xffffffff00000000)) + if (ACCESSING_DWORD_1) result |= (UINT64)program_read_masked_32le(offset + 4, mem_mask >> 32) << 32; return result; } @@ -949,9 +949,9 @@ static void program_write_qword_32be(offs_t offset, UINT64 data) static void program_write_qword_masked_32be(offs_t offset, UINT64 data, UINT64 mem_mask) { - if ((mem_mask & U64(0xffffffff00000000)) != U64(0xffffffff00000000)) + if (ACCESSING_DWORD_1) program_write_masked_32be(offset, data >> 32, mem_mask >> 32); - if ((mem_mask & U64(0x00000000ffffffff)) != U64(0x00000000ffffffff)) + if (ACCESSING_DWORD_0) program_write_masked_32be(offset + 4, data, mem_mask); } @@ -975,8 +975,8 @@ static void program_write_qword_32le(offs_t offset, UINT64 data) static void program_write_qword_masked_32le(offs_t offset, UINT64 data, UINT64 mem_mask) { - if ((mem_mask & U64(0x00000000ffffffff)) != U64(0x00000000ffffffff)) + if (ACCESSING_DWORD_0) program_write_masked_32le(offset, data, mem_mask); - if ((mem_mask & U64(0xffffffff00000000)) != U64(0xffffffff00000000)) + if (ACCESSING_DWORD_1) program_write_masked_32le(offset + 4, data >> 32, mem_mask >> 32); } |