Commit 12773987 authored by Erik Faye-Lund's avatar Erik Faye-Lund
Browse files

improved cycle-counting a bit, and moved clipper to iwram ;)

git-svn-id: https://pimpmobile.svn.sourceforge.net/svnroot/pimpmobile/trunk@155 3d5ecaf0-f903-0410-b953-c2c1a4d75763
parent e4bcdad7
......@@ -47,6 +47,7 @@ else
CXXFLAGS += -O3 -fomit-frame-pointer
CFLAGS += -O3 -fomit-frame-pointer
OBJS += src/pimp_mixer_arm.o
# OBJS += src/pimp_mixer_clip_arm.o
endif
......
......@@ -339,14 +339,14 @@ __pimp_mixer_clip_samples:
adr r5, .clipper_jumptable
ldr pc, [r5, r4, lsl #2]
.clip3:
ldr r4, [r1], #4
rsb r4, r3, r4, lsr #8
cmps r4, #127
movge r4, #127
cmps r4, #-128
movle r4, #-128
strb r4, [r0], #1
.clip3: @ 10 cycles pr sample
ldr r4, [r1], #4 @ 3 cycles
rsb r4, r3, r4, lsr #8 @ 1 cycle
cmps r4, #127 @ 1 cycle
movge r4, #127 @ 1 cycle
cmps r4, #-128 @ 1 cycle
movle r4, #-128 @ 1 cycle
strb r4, [r0], #1 @ 2 cycles
.clip2:
ldr r4, [r1], #4
......
......@@ -3,6 +3,11 @@
* For conditions of distribution and use, see copyright notice in LICENSE.TXT
*/
.text
.section .iwram
.arm
.align 2
@ samples to align = 3 - (DST & 3)
.clipper_align_jumptable: @ used to align the pointer
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment