On 12/4/21 10:29, Song Gao wrote:
> We should disable '__BITS_PER_LONG' at [1] before run gensyscalls.sh
> 
>  [1] arch/loongarch/include/uapi/asm/bitsperlong.h
> 
> Signed-off-by: Song Gao <gaos...@loongson.cn>
> Signed-off-by: Xiaojuan Yang <yangxiaoj...@loongson.cn>
> Reviewed-by: Richard Henderson <richard.hender...@linaro.org>
> ---
>  linux-user/loongarch64/syscall_nr.h     | 313 
> ++++++++++++++++++++++++++++++++
>  linux-user/loongarch64/target_syscall.h |  44 +++++
>  linux-user/syscall_defs.h               |  10 +-
>  scripts/gensyscalls.sh                  |   1 +
>  4 files changed, 364 insertions(+), 4 deletions(-)
>  create mode 100644 linux-user/loongarch64/syscall_nr.h
>  create mode 100644 linux-user/loongarch64/target_syscall.h

> +struct target_pt_regs {
> +    /* Saved main processor registers. */
> +    target_ulong regs[32];
> +
> +    /* Saved special registers. */

Eventually:

  struct {

> +    target_ulong csr_crmd;
> +    target_ulong csr_prmd;
> +    target_ulong csr_euen;
> +    target_ulong csr_ecfg;
> +    target_ulong csr_estat;
> +    target_ulong csr_era;
> +    target_ulong csr_badvaddr;

  } csr;

And rename registers accordingly.

> +    target_ulong orig_a0;
> +    target_ulong __last[0];
> +};
> +
> +#define UNAME_MACHINE "loongarch64"
> +#define UNAME_MINIMUM_RELEASE "5.16.0"
> +
> +#define TARGET_MCL_CURRENT 1
> +#define TARGET_MCL_FUTURE  2
> +#define TARGET_MCL_ONFAULT 4
> +
> +#define TARGET_FORCE_SHMLBA
> +
> +static inline abi_ulong target_shmlba(CPULoongArchState *env)
> +{
> +    return 0x10000;

Eventually 64 * KiB.

> +}

Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org>

Reply via email to