notaz.gp2x.de
/
pcsx_rearmed.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
4666f75
)
fix some issues and warnings seen on ctr build
author
notaz
<notasas@gmail.com>
Tue, 14 Dec 2021 19:09:45 +0000
(21:09 +0200)
committer
notaz
<notasas@gmail.com>
Tue, 14 Dec 2021 19:09:45 +0000
(21:09 +0200)
libpcsxcore/new_dynarec/assem_arm.c
patch
|
blob
|
blame
|
history
libpcsxcore/new_dynarec/assem_arm64.c
patch
|
blob
|
blame
|
history
libpcsxcore/new_dynarec/emu_if.h
patch
|
blob
|
blame
|
history
libpcsxcore/psxbios.c
patch
|
blob
|
blame
|
history
libpcsxcore/psxcommon.h
patch
|
blob
|
blame
|
history
plugins/dfsound/spu.c
patch
|
blob
|
blame
|
history
diff --git
a/libpcsxcore/new_dynarec/assem_arm.c
b/libpcsxcore/new_dynarec/assem_arm.c
index
3267cb6
..
381a541
100644
(file)
--- a/
libpcsxcore/new_dynarec/assem_arm.c
+++ b/
libpcsxcore/new_dynarec/assem_arm.c
@@
-473,6
+473,7
@@
static void emit_loadlp(u_int imm,u_int rt)
output_w32(0xe5900000|rd_rn_rm(rt,15,0));
}
output_w32(0xe5900000|rd_rn_rm(rt,15,0));
}
+#ifdef HAVE_ARMV7
static void emit_movw(u_int imm,u_int rt)
{
assert(imm<65536);
static void emit_movw(u_int imm,u_int rt)
{
assert(imm<65536);
@@
-485,6
+486,7
@@
static void emit_movt(u_int imm,u_int rt)
assem_debug("movt %s,#%d (0x%x)\n",regname[rt],imm&0xffff0000,imm&0xffff0000);
output_w32(0xe3400000|rd_rn_rm(rt,0,0)|((imm>>16)&0xfff)|((imm>>12)&0xf0000));
}
assem_debug("movt %s,#%d (0x%x)\n",regname[rt],imm&0xffff0000,imm&0xffff0000);
output_w32(0xe3400000|rd_rn_rm(rt,0,0)|((imm>>16)&0xfff)|((imm>>12)&0xf0000));
}
+#endif
static void emit_movimm(u_int imm,u_int rt)
{
static void emit_movimm(u_int imm,u_int rt)
{
@@
-530,17
+532,20
@@
static void emit_loadreg(int r, int hr)
if((r&63)==0)
emit_zeroreg(hr);
else {
if((r&63)==0)
emit_zeroreg(hr);
else {
-
int addr = (int)&psxRegs.GPR.r[r]
;
+
void *addr
;
switch (r) {
//case HIREG: addr = &hi; break;
//case LOREG: addr = &lo; break;
switch (r) {
//case HIREG: addr = &hi; break;
//case LOREG: addr = &lo; break;
- case CCREG: addr = (int)&cycle_count; break;
- case CSREG: addr = (int)&Status; break;
- case INVCP: addr = (int)&invc_ptr; break;
- case ROREG: addr = (int)&ram_offset; break;
- default: assert(r < 34); break;
+ case CCREG: addr = &cycle_count; break;
+ case CSREG: addr = &Status; break;
+ case INVCP: addr = &invc_ptr; break;
+ case ROREG: addr = &ram_offset; break;
+ default:
+ assert(r < 34);
+ addr = &psxRegs.GPR.r[r];
+ break;
}
}
- u_int offset =
addr-(u_int
)&dynarec_local;
+ u_int offset =
(u_char *)addr - (u_char *
)&dynarec_local;
assert(offset<4096);
assem_debug("ldr %s,fp+%d\n",regname[hr],offset);
output_w32(0xe5900000|rd_rn_rm(hr,FP,0)|offset);
assert(offset<4096);
assem_debug("ldr %s,fp+%d\n",regname[hr],offset);
output_w32(0xe5900000|rd_rn_rm(hr,FP,0)|offset);
@@
-2119,10
+2124,10
@@
static void c2op_assemble(int i, const struct regstat *i_regs)
}
#else
if(cv==3&&shift)
}
#else
if(cv==3&&shift)
- emit_far_call(
(int)
gteMVMVA_part_cv3sh12_arm);
+ emit_far_call(gteMVMVA_part_cv3sh12_arm);
else {
emit_movimm(shift,1);
else {
emit_movimm(shift,1);
- emit_far_call(
(int)(need_flags?gteMVMVA_part_arm:gteMVMVA_part_nf_arm)
);
+ emit_far_call(
need_flags?gteMVMVA_part_arm:gteMVMVA_part_nf_arm
);
}
if(need_flags||need_ir)
c2op_call_MACtoIR(lm,need_flags);
}
if(need_flags||need_ir)
c2op_call_MACtoIR(lm,need_flags);
diff --git
a/libpcsxcore/new_dynarec/assem_arm64.c
b/libpcsxcore/new_dynarec/assem_arm64.c
index
0b49221
..
84e4fc6
100644
(file)
--- a/
libpcsxcore/new_dynarec/assem_arm64.c
+++ b/
libpcsxcore/new_dynarec/assem_arm64.c
@@
-453,7
+453,7
@@
static void emit_loadreg(u_int r, u_int hr)
if (r == 0)
emit_zeroreg(hr);
else {
if (r == 0)
emit_zeroreg(hr);
else {
- void *addr
= &psxRegs.GPR.r[r]
;
+ void *addr;
switch (r) {
//case HIREG: addr = &hi; break;
//case LOREG: addr = &lo; break;
switch (r) {
//case HIREG: addr = &hi; break;
//case LOREG: addr = &lo; break;
@@
-461,7
+461,10
@@
static void emit_loadreg(u_int r, u_int hr)
case CSREG: addr = &Status; break;
case INVCP: addr = &invc_ptr; is64 = 1; break;
case ROREG: addr = &ram_offset; is64 = 1; break;
case CSREG: addr = &Status; break;
case INVCP: addr = &invc_ptr; is64 = 1; break;
case ROREG: addr = &ram_offset; is64 = 1; break;
- default: assert(r < 34); break;
+ default:
+ assert(r < 34);
+ addr = &psxRegs.GPR.r[r];
+ break;
}
if (is64)
emit_readdword(addr, hr);
}
if (is64)
emit_readdword(addr, hr);
diff --git
a/libpcsxcore/new_dynarec/emu_if.h
b/libpcsxcore/new_dynarec/emu_if.h
index
30cb9ef
..
0ce9584
100644
(file)
--- a/
libpcsxcore/new_dynarec/emu_if.h
+++ b/
libpcsxcore/new_dynarec/emu_if.h
@@
-85,7
+85,7
@@
extern void *scratch_buf_ptr;
extern u32 inv_code_start, inv_code_end;
/* cycles/irqs */
extern u32 inv_code_start, inv_code_end;
/* cycles/irqs */
-extern u
nsigned int
next_interupt;
+extern u
32
next_interupt;
extern int pending_exception;
/* called by drc */
extern int pending_exception;
/* called by drc */
diff --git
a/libpcsxcore/psxbios.c
b/libpcsxcore/psxbios.c
index
c191832
..
373057d
100644
(file)
--- a/
libpcsxcore/psxbios.c
+++ b/
libpcsxcore/psxbios.c
@@
-1066,7
+1066,7
@@
void psxBios_qsort() { // 0x31
}
void psxBios_malloc() { // 0x33
}
void psxBios_malloc() { // 0x33
- u
nsigned int
*chunk, *newchunk = NULL;
+ u
32
*chunk, *newchunk = NULL;
unsigned int dsize = 0, csize, cstat;
int colflag;
#ifdef PSXBIOS_LOG
unsigned int dsize = 0, csize, cstat;
int colflag;
#ifdef PSXBIOS_LOG
diff --git
a/libpcsxcore/psxcommon.h
b/libpcsxcore/psxcommon.h
index
3edab38
..
6104bfc
100644
(file)
--- a/
libpcsxcore/psxcommon.h
+++ b/
libpcsxcore/psxcommon.h
@@
-37,6
+37,10
@@
extern "C" {
#pragma GCC diagnostic ignored "-Wformat-overflow"
#pragma GCC diagnostic ignored "-Wstringop-truncation"
#endif
#pragma GCC diagnostic ignored "-Wformat-overflow"
#pragma GCC diagnostic ignored "-Wstringop-truncation"
#endif
+// devkitpro has uint32_t as long, unfortunately
+#ifdef _3DS
+#pragma GCC diagnostic ignored "-Wformat"
+#endif
// System includes
#include <stdio.h>
// System includes
#include <stdio.h>
diff --git
a/plugins/dfsound/spu.c
b/plugins/dfsound/spu.c
index
0a18887
..
07b1d2a
100644
(file)
--- a/
plugins/dfsound/spu.c
+++ b/
plugins/dfsound/spu.c
@@
-1318,14
+1318,12
@@
static void SetupStreams(void)
spu.pSpuBuffer = (unsigned char *)malloc(32768); // alloc mixing buffer
spu.SSumLR = calloc(NSSIZE * 2, sizeof(spu.SSumLR[0]));
spu.pSpuBuffer = (unsigned char *)malloc(32768); // alloc mixing buffer
spu.SSumLR = calloc(NSSIZE * 2, sizeof(spu.SSumLR[0]));
- spu.XAStart = // alloc xa buffer
- (uint32_t *)malloc(44100 * sizeof(uint32_t));
+ spu.XAStart = malloc(44100 * sizeof(uint32_t)); // alloc xa buffer
spu.XAEnd = spu.XAStart + 44100;
spu.XAPlay = spu.XAStart;
spu.XAFeed = spu.XAStart;
spu.XAEnd = spu.XAStart + 44100;
spu.XAPlay = spu.XAStart;
spu.XAFeed = spu.XAStart;
- spu.CDDAStart = // alloc cdda buffer
- (uint32_t *)malloc(CDDA_BUFFER_SIZE);
+ spu.CDDAStart = malloc(CDDA_BUFFER_SIZE); // alloc cdda buffer
spu.CDDAEnd = spu.CDDAStart + 16384;
spu.CDDAPlay = spu.CDDAStart;
spu.CDDAFeed = spu.CDDAStart;
spu.CDDAEnd = spu.CDDAStart + 16384;
spu.CDDAPlay = spu.CDDAStart;
spu.CDDAFeed = spu.CDDAStart;