freebsd-dev/sys/powerpc
Mitchell Horne 720dc6bcb5 Consolidate machine/endian.h definitions
This change serves two purposes.

First, we take advantage of the compiler provided endian definitions to
eliminate some long-standing duplication between the different versions
of this header. __BYTE_ORDER__ has been defined since GCC 4.6, so there
is no need to rely on platform defaults or e.g. __MIPSEB__ to determine
endianness. A new common sub-header is added, but there should be no
changes to the visibility of these definitions.

Second, this eliminates the hand-rolled __bswapNN() routines, again in
favor of the compiler builtins. This was done already for x86 in
e6ff6154d2. The benefit here is that we no longer have to maintain our
own implementations on each arch, and can instead rely on the compiler
to emit appropriate instructions or libcalls, as available. This should
result in equivalent or better code generation. Notably 32-bit arm will
start using the `rev` instruction for these routines, which is available
on armv6+.

PR:		236920
Reviewed by:	arichardson, imp
Tested by:	bdragon (BE powerpc)
MFC after:	3 weeks
Differential Revision:	https://reviews.freebsd.org/D29012
2021-03-26 19:00:22 -03:00
..
aim [PowerPC64] Clear low-order bits of ARPN 2021-03-25 14:01:57 -03:00
amigaone powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00
booke Add CFI start/end proc directives to arm64, i386, and ppc 2020-12-05 00:33:28 +00:00
conf [PowerPC64] add mpr to GENERIC64 and GENERIC64LE 2021-03-02 22:21:43 -03:00
cpufreq powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00
fpu powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00
include Consolidate machine/endian.h definitions 2021-03-26 19:00:22 -03:00
mambo Add CFI start/end proc directives to arm64, i386, and ppc 2020-12-05 00:33:28 +00:00
mikrotik powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00
mpc85xx Make MAXPHYS tunable. Bump MAXPHYS to 1M. 2020-11-28 12:12:51 +00:00
ofw Add CFI start/end proc directives to arm64, i386, and ppc 2020-12-05 00:33:28 +00:00
powermac powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00
powernv [POWERPC64LE] fix sysctl dev.opal_sensor.* on little-endian kernel 2020-12-30 22:00:28 -03:00
powerpc gdb: only return signal values for powerpc's gdb_cpu_signal() 2021-01-22 15:01:49 -04:00
ps3 Add CFI start/end proc directives to arm64, i386, and ppc 2020-12-05 00:33:28 +00:00
pseries [PowerPC64LE] pseries: Fix input buffering logic. 2021-02-25 14:50:13 -06:00
psim powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00