On 8/7/25 19:39, Richard Henderson wrote:
On 7/8/25 11:19, Philippe Mathieu-Daudé wrote:
-/**
- * target_big_endian:
- * Returns true if the (default) endianness of the target is big endian,
- * false otherwise. Common code should normally never need to know about the - * endianness of the target, so please do *not* use this function unless you
- * know very well what you are doing!
- */
...
+/**
+ * target_big_endian:
+ *
+ * Returns: %true if the (default) endianness of the target is big endian,
+ *          %false otherwise.
+ */
+bool target_big_endian(void);

Perhaps retain the warning about not using this unless necessary.

This is what I did in a previous version, but Thomas (or Pierrick?)
said something about this method now being safe, so the comment
obsolete.

I told Pierrick this method doesn't make sense to me in a
heterogeneous context, he said to not make change with the
current behavior, when run on a vCPU we'll eventually infer
via TargetInfo on the vCPU TLS area, and otherwise (I/O
thread) this method shouldn't be called so we should abort.
Such change LGTM. I can start updating the documentation
mentioning "the (default) endianness of the current vCPU."
Currently on I/O thread this is the endianness of the binary.

Reviewed-by: Richard Henderson <richard.hender...@linaro.org>


r~


Reply via email to