[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v13 20/26] linux-user: Add LoongArch elf support
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v13 20/26] linux-user: Add LoongArch elf support |
Date: |
Sat, 4 Dec 2021 18:05:44 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0 |
On 12/4/21 10:29, Song Gao wrote:
> Signed-off-by: Song Gao <gaosong@loongson.cn>
> Signed-off-by: Xiaojuan Yang <yangxiaojuan@loongson.cn>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> include/elf.h | 2 ++
> linux-user/elfload.c | 58
> +++++++++++++++++++++++++++++++++++++
> linux-user/loongarch64/target_elf.h | 12 ++++++++
> 3 files changed, 72 insertions(+)
> create mode 100644 linux-user/loongarch64/target_elf.h
> +/* See linux kernel: arch/loongarch/include/asm/reg.h. */
> +enum {
> + TARGET_EF_R0 = 0,
> + TARGET_EF_CSR_ERA = TARGET_EF_R0 + 32,
> + TARGET_EF_CSR_BADVADDR = TARGET_EF_R0 + 33,
> +};
> +
> +/* See linux kernel: arch/loongarch/kernel/process.c:loongarch_dump_regs64.
> */
> +static void elf_core_copy_regs(target_elf_gregset_t *regs,
> + const CPULoongArchState *env)
> +{
> + int i;
> +
> + for (i = 0; i < TARGET_EF_R0; i++) {
> + (*regs)[i] = 0;
> + }
Dead code... Removing it:
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> + (*regs)[TARGET_EF_R0] = 0;
> +
> + for (i = 1; i < ARRAY_SIZE(env->gpr); i++) {
> + (*regs)[TARGET_EF_R0 + i] = tswapreg(env->gpr[i]);
> + }
> +
> + (*regs)[TARGET_EF_CSR_ERA] = tswapreg(env->pc);
> + (*regs)[TARGET_EF_CSR_BADVADDR] = tswapreg(env->badaddr);
> +}
- [PATCH v13 25/26] target/loongarch: 'make check-tcg' support, (continued)
- [PATCH v13 25/26] target/loongarch: 'make check-tcg' support, Song Gao, 2021/12/04
- [PATCH v13 21/26] linux-user: Add LoongArch syscall support, Song Gao, 2021/12/04
- [PATCH v13 12/26] target/loongarch: Add floating point conversion instruction translation, Song Gao, 2021/12/04
- [PATCH v13 10/26] target/loongarch: Add floating point arithmetic instruction translation, Song Gao, 2021/12/04
- [PATCH v13 13/26] target/loongarch: Add floating point move instruction translation, Song Gao, 2021/12/04
- [PATCH v13 06/26] target/loongarch: Add fixed point bit instruction translation, Song Gao, 2021/12/04
- [PATCH v13 18/26] linux-user: Add LoongArch specific structures, Song Gao, 2021/12/04
- [PATCH v13 20/26] linux-user: Add LoongArch elf support, Song Gao, 2021/12/04
- Re: [PATCH v13 20/26] linux-user: Add LoongArch elf support,
Philippe Mathieu-Daudé <=
- [PATCH v13 02/26] target/loongarch: Add core definition, Song Gao, 2021/12/04
- [PATCH v13 22/26] linux-user: Add LoongArch cpu_loop support, Song Gao, 2021/12/04
- [PATCH v13 15/26] target/loongarch: Add branch instruction translation, Song Gao, 2021/12/04
- [PATCH v13 16/26] target/loongarch: Add disassembler, Song Gao, 2021/12/04
- Re: [PATCH v13 00/26] Add LoongArch linux-user emulation support, gaosong, 2021/12/15