summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/cpu
diff options
context:
space:
mode:
author Cowering <cowering@users.noreply.github.com>2015-07-23 10:48:28 -0500
committer Cowering <cowering@users.noreply.github.com>2015-07-23 10:48:28 -0500
commitdf2ebdea8d7c261d7e659593df32eaead1bd3fdd (patch)
tree926ff9a76669597e7c8b5d1107c738f3502ab6f0 /src/emu/cpu
parent9d0e2427a48ac9806f0dd12646b2eaec5dab792a (diff)
please bear with me.. these are needed to compile in GCC 5.2 and I want mingw guys to see them. with luck they can be reverted in a couple of days (nw)
Diffstat (limited to 'src/emu/cpu')
-rw-r--r--src/emu/cpu/sh2/sh2comn.c28
1 files changed, 20 insertions, 8 deletions
diff --git a/src/emu/cpu/sh2/sh2comn.c b/src/emu/cpu/sh2/sh2comn.c
index f6883649ee9..38b6d633c22 100644
--- a/src/emu/cpu/sh2/sh2comn.c
+++ b/src/emu/cpu/sh2/sh2comn.c
@@ -13,6 +13,14 @@
#include "sh2.h"
#include "sh2comn.h"
+
+// for now, make buggy GCC/Mingw STFU about I64FMT
+#if (defined(__MINGW32__) && (__GNUC__ >= 5))
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wformat"
+#pragma GCC diagnostic ignored "-Wformat-extra-args"
+#endif
+
#define VERBOSE 0
#define LOG(x) do { if (VERBOSE) logerror x; } while (0)
@@ -887,7 +895,7 @@ void sh2_device::sh2_exception(const char *message, int irqline)
/*
SH-7021 on-chip device
*/
-
+
void sh2a_device::sh7032_dma_exec(int ch)
{
const short dma_word_size[4] = { 0, +1, -1, 0 };
@@ -897,11 +905,11 @@ void sh2a_device::sh7032_dma_exec(int ch)
logerror("Warning: SH7032 DMA enables non auto-request transfer\n");
return;
}
-
+
// channel enable & master enable
if((m_dma[ch].chcr & 1) == 0 || (m_dmaor & 1) == 0)
return;
-
+
printf("%08x %08x %04x\n",m_dma[ch].sar,m_dma[ch].dar,m_dma[ch].chcr);
UINT8 dm = (m_dma[ch].chcr >> 14) & 3; /**< Destination Address Mode bits */
UINT8 sm = (m_dma[ch].chcr >> 12) & 3; /**< Source Address Mode bits */
@@ -909,25 +917,25 @@ void sh2a_device::sh7032_dma_exec(int ch)
int src_word_size = dma_word_size[sm] * ((ts == true) ? 2 : 1);
int dst_word_size = dma_word_size[dm] * ((ts == true) ? 2 : 1);
UINT32 src_addr = m_dma[ch].sar;
- UINT32 dst_addr = m_dma[ch].dar;
+ UINT32 dst_addr = m_dma[ch].dar;
UINT32 size_index = m_dma[ch].tcr;
if(size_index == 0)
size_index = 0x10000;
-
+
if(ts == false)
logerror("SH7032: DMA byte mode check\n");
-
+
for(int index = size_index;index>-1;index--)
{
if(ts == true)
m_program->write_word(dst_addr,m_program->read_word(src_addr));
else
m_program->write_byte(dst_addr,m_program->read_byte(src_addr));
-
+
src_addr += src_word_size;
dst_addr += dst_word_size;
}
-
+
m_dma[ch].chcr &= ~1; /**< @todo non-instant DMA */
printf("%02x %02x %02x %1d\n",sm,dm,rs,ts);
}
@@ -1014,3 +1022,7 @@ WRITE16_MEMBER(sh2a_device::sh7021_w)
{
COMBINE_DATA(&m_sh7021_regs[offset]);
}
+#if (defined(__MINGW32__) && (__GNUC__ >= 5))
+#pragma GCC diagnostic pop
+#endif
+