Add more simplifications where it is practical; unify WRITECHAR() as
it has no need for byte swapping in any way.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Make the WRITE*() macros independent of pointer type. As it was, we
would get totally wrong result on X86_MEMORY machines if the pointer
was not uint8_t *.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
We can't really avoid the double expansion of (p), but the WRITE*()
macros all do that. However, there is no reason to double-expand (s).
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
WRITEADDR() really doesn't need multiple implementations. Unify them,
and optimize the case of a constant length argument (not sure if that
is currently used, however.)
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Move byte order handling functions to their own header file, and try
to be more specific about how exactly to handle things.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>