[PATCH 1/3] system/memory: Remove ldn_he_p() and stn_he_p() helpers

Philippe Mathieu-Daudé posted 3 patches 1 week, 2 days ago
[PATCH 1/3] system/memory: Remove ldn_he_p() and stn_he_p() helpers
Posted by Philippe Mathieu-Daudé 1 week, 2 days ago
ldn_he_p() and stn_he_p() helpers expand to a plain
memcpy(), but in a convoluted way. We are not using
them, just remove so we are not tempted to start to.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 include/qemu/bswap.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h
index 65a1b3634f4..b77ea955de5 100644
--- a/include/qemu/bswap.h
+++ b/include/qemu/bswap.h
@@ -412,7 +412,6 @@ static inline void stq_be_p(void *ptr, uint64_t v)
         }                                                               \
     }
 
-DO_STN_LDN_P(he)
 DO_STN_LDN_P(le)
 DO_STN_LDN_P(be)
 
-- 
2.52.0


Re: [PATCH 1/3] system/memory: Remove ldn_he_p() and stn_he_p() helpers
Posted by Paolo Bonzini 1 week, 2 days ago
Il dom 28 dic 2025, 17:18 Philippe Mathieu-Daudé <philmd@linaro.org> ha
scritto:

> ldn_he_p() and stn_he_p() helpers expand to a plain
> memcpy(), but in a convoluted way. We are not using
> them, just remove so we are not tempted to start to.
>

I am confused, doesn't ati_2d.c use them? And in the future they could also
be used by ram_device_ops etc.

Paolo

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>  include/qemu/bswap.h | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h
> index 65a1b3634f4..b77ea955de5 100644
> --- a/include/qemu/bswap.h
> +++ b/include/qemu/bswap.h
> @@ -412,7 +412,6 @@ static inline void stq_be_p(void *ptr, uint64_t v)
>          }                                                               \
>      }
>
> -DO_STN_LDN_P(he)
>  DO_STN_LDN_P(le)
>  DO_STN_LDN_P(be)
>
> --
> 2.52.0
>
>
Re: [PATCH 1/3] system/memory: Remove ldn_he_p() and stn_he_p() helpers
Posted by Philippe Mathieu-Daudé 1 week, 2 days ago
On 28/12/25 21:29, Paolo Bonzini wrote:
> 
> 
> Il dom 28 dic 2025, 17:18 Philippe Mathieu-Daudé <philmd@linaro.org 
> <mailto:philmd@linaro.org>> ha scritto:
> 
>     ldn_he_p() and stn_he_p() helpers expand to a plain
>     memcpy(), but in a convoluted way. We are not using
>     them, just remove so we are not tempted to start to.
> 
> 
> I am confused, doesn't ati_2d.c use them? And in the future they could 
> also be used by ram_device_ops etc.

Yeah sorry, this patch is crap, I should better get some rest.