Fix non-MSVC builds

This commit is contained in:
twinaphex 2020-08-16 04:18:22 +02:00
parent 36b82d8cf2
commit 68329d146b
2 changed files with 9 additions and 1 deletions

View File

@ -462,7 +462,7 @@ static void rcache_free_tmp(int hr);
// SR must and R0 should by all means be statically mapped.
// XXX the static definition of SR MUST match that in compiler.h
#ifdef __arm__ || defined(_M_ARM)
#if defined(__arm__) || defined(_M_ARM)
#include "../drc/emit_arm.c"
#elif defined(__aarch64__) || defined(_M_ARM64)
#include "../drc/emit_arm64.c"

View File

@ -1958,7 +1958,11 @@ int p32x_sh2_memcpy(u32 dst, u32 src, int count, int size, SH2 *sh2)
return 0;
if ((ps = p32x_sh2_get_mem_ptr(src, &mask, sh2)) == (void *)-1)
return 0;
#if _MSC_VER
(char*)ps += src & mask;
#else
ps += src & mask;
#endif
len = count * size;
// DRAM in byte access is always in overwrite mode
@ -1968,7 +1972,11 @@ int p32x_sh2_memcpy(u32 dst, u32 src, int count, int size, SH2 *sh2)
// align dst to halfword
if (dst & 1) {
p32x_sh2_write8(dst, *(u8 *)((uptr)ps ^ 1), sh2);
#if _MSC_VER
((char*)ps)++, dst++, len --;
#else
ps++, dst++, len --;
#endif
}
// copy data