Skip to content

Commit 89298a8

Browse files
author
Maciek
committed
BUG FIX: Getting rid of asm optimizations
On psp-gcc 4.9.3/4.6.4 asm optimizations are broken.
1 parent 9311fa5 commit 89298a8

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

pg.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,9 @@ void pgBitBltSgb(unsigned long x,unsigned long y,unsigned long *d)
196196

197197
v0=(unsigned long *)pgGetVramAddr(x,y);
198198
for (yy=0; yy<224; yy++) {
199-
__memcpy4a(v0,d,256/2);
199+
__memcpy4(v0,d,256/2);
200+
v0+=256/2;
201+
d+=256/2;
200202
v0+=(LINESIZE/2-256/2);
201203
}
202204
}
@@ -210,7 +212,9 @@ void pgBitBltN1(unsigned long x,unsigned long y,unsigned long *d)
210212
v0=(unsigned long *)pgGetVramAddr(x,y);
211213
d+=GUARD_LINE/2;
212214
for (yy=0; yy<144; yy++) {
213-
__memcpy4a(v0,d,80);
215+
__memcpy4(v0,d,80);
216+
d+=80;
217+
v0+=80;
214218
v0+=(LINESIZE/2-80);
215219
d+=GUARD_LINE;
216220
}

pg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ static inline void __memcpy4a(unsigned long *d, unsigned long *s, unsigned long
149149
);
150150
}
151151

152-
#define __USE_MIPS32R2__
152+
//#define __USE_MIPS32R2__
153153

154154
static inline void cpy2x(unsigned long *d, unsigned long cc)
155155
{

sound.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ static void wavout_snd0_callback(short *buf, unsigned long reqn)
1919
unsigned int ptr=cur_play;
2020
unsigned int nextptr=ptr+reqn;
2121
if (nextptr>=sound_buf_len*4) nextptr=0;
22-
__memcpy4a((unsigned long *)buf, (unsigned long *)&sound_buf[ptr*2], reqn);
22+
__memcpy4((unsigned long *)buf, (unsigned long *)&sound_buf[ptr*2], reqn);
2323
// __memcpy4((unsigned long *)buf, (unsigned long *)&sound_buf[ptr*2], reqn);
2424
cur_play=nextptr;
2525
}

0 commit comments

Comments
 (0)