15.05.2014 22:22, Richard Henderson wrote: > On 05/15/2014 11:13 AM, Peter Maydell wrote: >> On 2 May 2014 19:48, Richard Henderson <r...@twiddle.net> wrote: >>> On 05/02/2014 10:32 AM, Peter Maydell wrote: >>>> We have an unfortunate naming clash between the functions >>>> ldl_p, stl_p, etc defined in bswap.h (which have semantics >>>> "load/store in host endianness") and the #defines of the same >>>> name in cpu-all.h (which have the semantics "load/store in >>>> target endianness"). >>>> >>>> Fortunately it turns out that the only users of the bswap.h >>>> functions are all within bswap.h itself, so we can simply >>>> rename them to include a _he_ infix for "host endianness". >>>> >>>> Signed-off-by: Peter Maydell <peter.mayd...@linaro.org> >>>> --- >>>> Frankly I'm surprised that the only users of these functions >>>> are the ones within bswap.h itself, but it's a lucky escape >>>> from having to audit an enormous pile of code... >>>> >>>> We had talked about changing the "target-endian" accessors >>>> to be ldl_te_p &c, but given the uses aren't tangled together >>>> as I feared they would be, I'm not sure we can justify the >>>> global function rename. >>> >>> I'm surprised too, but... good news, I guess. >>> >>> Reviewed-by: Richard Henderson <r...@twiddle.net> >> >> Anybody care to suggest a submaintainer tree this should >> go in via? > > Trivial? Ha, ha, only serious.
Oh well. Okay. I checked every macro in there, and indeed, it does not look like these macros are used outside of bswap.h itself. I modified the macros to expand to syntactically-incorrect code and modified all usages of those inside bswap.h to make it correct again, just to verify, and did a rebuild. Unfortunately I don't have easy access to non-x86 hardware to try other host byte order, but this should already be a good test. So that should be an okay change. So.. Applying to -trivial, thank you! :) /mjt