asm volatile (
"mov %[t0], %[out], asr #11 \n"
"mul %[out], %[t0], %[envx] \n"
: [out]"+r"(output), [t0]"=&r"(t0)
: [envx]"r"((int) voice->envx));
This is resulting in "Rd and Rm should be different in mul" error,
because the compiler is putting [out] and [t0] into the same
register.
After some poking there doesn't appear to be a sane way to change
the constraints, so just disable it for now.
Change-Id: I7827713c8aadb27f0bf4a6f4a3e1d910c6193686
We used 16-bit variables to store the 'character code' everywhere but
this won't let us represent anything beyond U+FFFF.
This patch changes those variables to a custom type that can be 32 or 16
bits depending on the build, and adjusts numerous internal APIs and
datastructures to match. This includes:
* utf8decode() and friends
* font manipulation, caching, rendering, and generation
* on-screen keyboard
* FAT filesystem (parsing and generating utf16 LFNs)
* WIN32 simulator platform code
Note that this patch doesn't _enable_ >16bit unicode support; a followup
patch will turn that on for appropriate targets.
Appears to work on:
* hosted linux, native, linux simulator in both 16/32-bit modes.
Needs testing on:
* windows and macos simulator (16bit+32bit)
Change-Id: Iba111b27d2433019b6bff937cf1ebd2c4353a0e8
High-frequency files increasingly use a block size of over 4608B, which
means we need larger buffers to decode them. However, larger buffers no
longer fit in IRAM on less-capable devices, hurting performance for
"normal" file playback.
On our slowest devices (M68K and PP-based devices), this is not worth
the tradeoff as they will likely not have enough CPU oomph to decode and
downmix these files in realtime.
S5L87xx-based devices have the raw performance to do this, so we decided
to err on the side of wider file compatibility at the cost of some
performance.
All other devices are unaffected.
Change-Id: I7344cf4c8c6b7b5c14f1ea67381160665d6ece5b
We already use targeted optimization for most codecs, and the
DSP code is just as performance-sensitive.
Improves mp3 decoding performance by a whopping 1% wwhen PBE is
turned on.
Change-Id: I801a6624c0f7068b6cd67961ad3b08f809b92fca
cRSID natively renders its output as a 16bit mono stream. There's no
reason to not use it as-is, and save a bunch of CPU cycles in the
process.
Change-Id: Ib934c05e77298e377053b29db91d1f05fb65eb76
We used 16-bit variables to store the 'character code' everywhere but
this won't let us represent anything beyond U+FFFF.
This patch changes those variables to a custom type that can be 32 or 16
bits depending on the build, and adjusts numerous internal APIs and
datastructures to match. This includes:
* utf8decode() and friends
* on-screen keyboard
* font manipulation, caching, rendering, and generation
* VFAT code parses and generates utf16 dirents
* WIN32 simulator reads and writes utf16 filenames
Note that this patch doesn't _enable_ >16bit unicode support; a followup
patch will turn that on for appropriate targets.
Known bugs:
* Native players in 32-bit unicode mode generate mangled filename
entries if they include UTF16 surrogate codepoints. Root cause
is unclear, and may reside in core dircache code.
Needs testing on:
* windows simulator (16bit+32bit)
Change-Id: I193a00fe2a11a4181ddc82df2d71be52bf00b6e6
Show Track Info now shows Discnum/Tracknum as "i/n" (e.g., "1/3" for disc 1 of 3). Previously, it only showed the disc/track number without the total count.
Change-Id: If6b2a73ad0fecc27aaee371f8c860031eacca796
This reverts commit 9e93796407.
Fixes FS#13626, which is caused by non-audio ID3v1/APE tags at
the end of the audio data stream.
Change-Id: Ic69af14a5d1264b7896a54b5f2ad314022dd98ac
The "fix" produces different asm and I don't have the bandwidth
to determine if it's functionally equivalent.
Change-Id: I822557d1244f8e8a05e7ebfc45da2643152345a4
/* offset = -3db * (ratio - 1) / ratio */
db_curve[2].offset = (int32_t)((long long)(-3 << 16)
* (ratio - 1) / ratio);
Results in a warning: left shift of negative value [-Wshift-negative-value]
To fix this, replace the '-3' with -3UL.
(As that is effectively what is already happening)
Change-Id: I5aa269ff332703d3c2d889fa032d2fdc403ff14f
The warnings triggered by -Wshift-negative-value are in the
upstream code, and presumably "correct"
Change-Id: I1cf20e12208f493c69e0852477d800cd417a67c6
sample_to_chunk last value was ignored in some cases leading to invalid sample value in lookup_table.
Fixes FS#13600
Change-Id: I8f066966e15c384d3185f689b68a2cc2a3abad1d
Cortex-M7 support was added in GCC 5, while GCC 4.9 only
supports the M4. The instruction set is almost identical
between both processors; the only difference is that the
M7 supports double-precision floating point and the M4
doesn't.
Since Rockbox currently doesn't use the FPU, building M7
targets as M4 works fine.
Change-Id: I5880d6e81a85fa9b3e16e08d57e7955b4493df0b
Some assembly routines don't work on Thumb as-is. For now
just disable these so the codecs compile.
Affected codecs:
- libflac
- libmad
- libspeex
- libtta
- libwavpack
A few DSP routines need to be disabled for the same reason:
- crossfeed_process
- crossfeed_meier_process
- resample_hermite
- filter_process
- sample_output_stereo
Change-Id: I277e0719652096745a19a7e2b597eff32d8e1553
We can't use Operand2 with register based shifts on ARMv7-M as it
isn't supported in the Thumb encoding. Instead, perform the shift
separately.
Change-Id: Ie96aa0a565e98bbca724dffc2ffc6d64fdb5d7c3
GAS warns about unpredictable behavior of "ldr sp, [a1], #4"
that exists on Cortex-M3 (errata 752419) but this warning is
incorrectly issued on other cores too (eg, Cortex-M7).
Since the fix is just one extra instruction we may as well
apply the workaround for all Cortex-M targets.
Change-Id: I0c2aa46837f776d67d0236b627af1572aa5ab307
On Cortex-M we can just return SP directly, which will return
PSP/MSP depending on the current processor mode.
Note that unwarminder doesn't handle Cortex-M exception frames
yet, so a panic from an interrupt handler will currently stop
at the exception boundary.
Change-Id: I8818126c065c896d781bd52b877965a4094dee2a
This makes these files compileable, or in some cases less
broken, on Cortex-M targets.
In lcd-16bit.c, newer versions of GAS complain about the
infix condition codes so we use the suffix form instead,
which requires unified syntax to compile on GCC 4.9.
Change-Id: If45166d3fc83d64c692cbb331096a966397aa9e9
ARMv7-M has hardware division, so it doesn't require __div0
or any support functions for 32-bit division.
Change-Id: I840683a1a77d737f378899ca4bcf858216b81014
For some reason it caused a crash on asan enabled simulator builds but worked fine otherwise.
Fixup for 0847bcc1 and ac8714dd
Change-Id: Iff1c2779d5fa6889c743cdccd8e1feaf55684394
Previously logging just showed that the file was
passed to the function without any indication that
the parsing failed
Adds status strings to record failure to open, missing parser, parser error
Change-Id: I5234153464bab9a5f9fb765d5e1cfa59dfe0ebfe
This puts the entire ~26K decoder state structure into IRAM.
(was lost as part of 14c6bb798d, Nov 2019)
Change-Id: Idbf53657e7c0581b4e47247fc5550b59842b23f1
callgrind identified check_viewport and scan_int as pretty hot code paths on startup
and playback
check_viewport uses strlen to check the string has at least 4 characters
we can just check if str[3] != '\0' without walking potentially much further
and no function call..
scan_int was building a buffer for atoi to parse when we can just do it in the loop
directly
Change-Id: Ie028980333cbed4c066d8ea547a89cf4fad76808
Revisit this after discussion with chris_s on IRC and forum
Pitch menu now changes icon when pitch has been changed
uses NVRAM to save the pitch settings unconditionally
Manual updated
Change-Id: Idcb4c2b7fe42f7a203dc4bfc46285657f370d0fd
core_alloc works well for this and we can allow the alloc to be moved
bugfix compressor_process() possible buffer overflow
Change-Id: I701c6306c39cc1c7aa72b0dbe402b9b0d1a3fcda
I meant to add this with the last patch b07d7d6
since it may supply UNBUFFERED_ID3 to the peek function
which uses UNBUFFERED_ID3 and will try to copy it back
wich is undefined behavior for memcpy
Change-Id: I91160570adac22134c84d3b37f8fcecb097d87d6
%ft(filename,search_text)
finds a line beginning with search_text strips search_text and returns
the remainder of the line
Change-Id: I06fe029b89aa60e4dbf34c039d180c75213519a4
On MacOS, gcc is a symlink for clang.
Patch gets rid of the warnings produced by clang,
when it is set as HOSTCC, and fixes voicetools
compilation on MacOS when calling make voicetools
from the simulator directory.
lua rb_defines_helper:
format specifies type 'int' but the argument has
type 'long'
codecs: opus / speex (LOGF):
format '%ld' expects argument of type 'long int',
but argument 7 has type 'off_t'
gigabeat:
variable 'size' set but not used
rdf2binary:
a function declaration without a prototype is
deprecated in all versions of C
rbspeexdec:
passing 'unsigned char *' to parameter of type
'char *' converts between pointers to integer
types where one is of the unique plain 'char'
type and the other is not
hmac-sha1.c
defining a type within 'offsetof' is a Clang
extension
Change-Id: I90539906698868f9589650585d865aee9f7e8539
configure:
Ensure Werror option doesn't get lost when simcc resets GCCOPTS
uisimulator.make:
Remove ignored duplicate SIMLIB on Darwin
codecs.make:
Eliminate some redundancy
Change-Id: Ieee6f677fd22666cb58aa6fe53eabdc0b0f8c190