Commit graph

8 commits

Author SHA1 Message Date
Aidan MacDonald
ec9e484f64 firmware: Add load/store with endianness functions
Define common functions for loading 16/32/64-bit unsigned integers
with big, little, or host endianness, and distinguishing unaligned
and aligned cases.

Unaligned loads are supported generically by default, but this can
be overridden with a more efficient implementation on architectures
which support unaligned loads natively.

Change-Id: I3d826ec1a7646777876366eeece2cbccab60c1fb
2022-06-26 17:19:40 +01:00
Franklin Wei
439a0d1d91 rbendian.h: fall back to generic swap macros
Change-Id: If85086c0fd6b22d50759b16d2545e1798832d12c
2019-07-09 11:20:55 -04:00
William Wilgus
0f5f5c3390 Fix Sim & checkwps for newer distros
__builtin found fix for rbendian.h
tools/configure defines SIM_USE_BYTESWAP_H if byteswap.h is found in
/usr/include/ maybe there is a better mechanism for this

Change-Id: I4d004e68313e8b32aa5587582be36bc459fdaf6b
2018-12-08 03:19:14 -06:00
William Wilgus
9450689483 Fix Sim for newer distros
__builtin found fix for rbendian.h
tools/configure defines SIM_USE_BYTESWAP_H if byteswap.h is found in
/usr/include/ maybe there is a better mechanism for this

genshortcut.sh is a simple script to make .desktop shortcut files
several newer distros don't allow you to run the simulator from the
file manager, this or perhaps a different method can probably be
included while building a sim at a later date.

for now it can be run manually like so:
similar to ../tools/configure
run from your simulator folder
../tools/genshortcut.sh exepath shortname icon
ex. ../tools/genshortcut.sh ./rockboxui clip+sim music-app

Change-Id: Ia05d3a9349b27c5968a4a7a68b2eb480e60faec3
2018-12-07 21:04:30 +01:00
Franklin Wei
ed6526404f Support using swapxx() and bswap_xx() for byteswaps in rbendian.h
- patch suggested by Massa in http://forums.rockbox.org/index.php/topic,51618.msg238760.html#msg238760

Change-Id: Iba93ff53119db00a18d944d52bc8b1c5fe593fc9
2017-01-15 12:37:46 -05:00
Thomas Jarosch
3add6c7435 Fix up maemo port after byte swap header refactoring
Turns out maemo's old gcc 4.2.1 doesn't include any arch
optimized swapXX() functions, just plain C implementations.

Before we pull in lots of linux kernel headers for the
C implementation, just stick to rockbox's own version.

Change-Id: Ic28b41b52fe47f814c7f3897ce15334a42b6c5e2
2014-12-17 23:29:44 +01:00
Michael Sevakis
25f73d6207 Patch up rbendian.h for Win32 cross-compile
MingW doesn't provide that stuff.

Change-Id: Ifa8310ed00f4f79f06adb71db71e58b70e7d2b60
2014-08-26 15:53:49 -04:00
Michael Sevakis
6ffb8ffeee Do a better endian.h setup that isn't as fragile
We redefine the top-level macros to our own in order to maintain
compatibility with compound initializers by wrapping the mid or low
level definitions from the OS header.

This allows, hopefully optimized, macros from the host OS's headers to
be used when building any hosted target obviating the need for
NEED_GENERIC_BYTESWAPS unless the target simply doesn't define its
own optimized versions (MIPS!).

Throw in some 64-bit swaps for completeness' sake; they generate no code
if not yet used anyway.

Change-Id: I21b384b55fea46833d01ea3cad1ad8952ea01a11
2014-08-25 12:16:56 -04:00