qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] cputlb: ensure _cmmu helper functions follow the naming stan


From: Peter Maydell
Subject: Re: [PATCH] cputlb: ensure _cmmu helper functions follow the naming standard
Date: Mon, 21 Oct 2019 14:33:53 +0100

On Mon, 21 Oct 2019 at 14:29, Alex Bennée <address@hidden> wrote:
>
> We document this in docs/devel/load-stores.rst so lets follow it. The
> 32 bit and 64 bit access functions have historically not included the
> sign so we leave those as is.
>
> The few places that use signed code loads are fixed up to do the
> casting themselves.
>
> Fixes: 282dffc8
> Signed-off-by: Alex Bennée <address@hidden>


> diff --git a/target/cris/translate.c b/target/cris/translate.c
> index e752bd06093..f7d3b3e4fdc 100644
> --- a/target/cris/translate.c
> +++ b/target/cris/translate.c
> @@ -231,7 +231,7 @@ static int cris_fetch(CPUCRISState *env, DisasContext 
> *dc, uint32_t addr,
>      case 2:
>      {
>          if (sign) {
> -            r = cpu_ldsw_code(env, addr);
> +            r = (int16_t) cpu_lduw_code(env, addr);
>          } else {
>              r = cpu_lduw_code(env, addr);
>          }

Why not provide the cpu_ldsw_code() that returns an int16_t ?

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]