git-svn-id: file:///home/notaz/opt/svn/PicoDrive@35 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
notaz 2007-02-09 23:39:03 +00:00
parent e11c55481f
commit cea6590346
10 changed files with 69 additions and 99 deletions

View file

@ -8,22 +8,6 @@
}
void memcpy32(int *dest, int *src, int count)
{
while (count--)
*dest++ = *src++;
}
void memset32(int *dest, int c, int count)
{
while (count--)
*dest++ = c;
}
void mix_32_to_16l_stereo(short *dest, int *src, int count)
{
int l, r;
@ -55,3 +39,16 @@ void mix_32_to_16_mono(short *dest, int *src, int count)
}
/* unimplemented... */
void mix_16h_to_32(int *dest_buf, short *mp3_buf, int count)
{
}
void mix_16h_to_32_s1(int *dest_buf, short *mp3_buf, int count)
{
}
void mix_16h_to_32_s2(int *dest_buf, short *mp3_buf, int count)
{
}

View file

@ -1,6 +1,4 @@
void memcpy32(int *dest, int *src, int count);
void memset32(int *dest, int c, int count);
//void mix_32_to_32(int *dest, int *src, int count);
void mix_16h_to_32(int *dest, short *src, int count);
void mix_16h_to_32_s1(int *dest, short *src, int count);

View file

@ -1,63 +1,5 @@
@ vim:filetype=armasm
.global memcpy32 @ int *dest, int *src, int count
memcpy32:
stmfd sp!, {r4,lr}
subs r2, r2, #4
bmi mcp32_fin
mcp32_loop:
ldmia r1!, {r3,r4,r12,lr}
subs r2, r2, #4
stmia r0!, {r3,r4,r12,lr}
bpl mcp32_loop
mcp32_fin:
tst r2, #3
ldmeqfd sp!, {r4,pc}
tst r2, #1
ldrne r3, [r1], #4
strne r3, [r0], #4
mcp32_no_unal1:
tst r2, #2
ldmneia r1!, {r3,r12}
ldmfd sp!, {r4,lr}
stmneia r0!, {r3,r12}
bx lr
.global memset32 @ int *dest, int c, int count
memset32:
stmfd sp!, {lr}
mov r3, r1
subs r2, r2, #4
bmi mst32_fin
mov r12,r1
mov lr, r1
mst32_loop:
subs r2, r2, #4
stmia r0!, {r1,r3,r12,lr}
bpl mst32_loop
mst32_fin:
tst r2, #1
strne r1, [r0], #4
tst r2, #2
stmneia r0!, {r1,r3}
ldmfd sp!, {lr}
bx lr
@ this assumes src is word aligned
.global mix_16h_to_32 @ int *dest, short *src, int count

View file

@ -112,7 +112,6 @@
#include <math.h>
#include "ym2612.h"
#include "mix.h"
#ifndef EXTERNAL_YM2612
#include <stdlib.h>
@ -125,6 +124,8 @@ extern YM2612 *ym2612_940;
#endif
void memset32(int *dest, int c, int count);
#ifndef __GNUC__
#pragma warning (disable:4100) // unreferenced formal parameter